authorizeAccess(); $this->form->setService($this->service); } protected function authorizeAccess(): void { // Allow edit if user is the creator or if service was created anonymously if (!is_null($this->service->created_by) && auth()->id() !== $this->service->created_by) { abort(403); } } public function save(): void { $this->authorizeAccess(); $this->form->update(); session()->flash('status', __('Service erfolgreich aktualisiert!')); } public function with(): array { return [ 'types' => collect(SelfHostedServiceType::cases())->map(fn($c) => [ 'value' => $c->value, 'label' => $c->label() ]), ]; } }; ?>