service->load('createdBy'); $this->country = request()->route('country', config('app.domain_country')); } public function delete(): void { // Only allow deletion if user is the creator if (auth()->id() === $this->service->created_by) { $this->service->delete(); session()->flash('status', __('Service erfolgreich gelöscht!')); redirect()->route('services.index', ['country' => $this->country]); } else { abort(403); } } public function with(): array { return [ 'service' => $this->service, ]; } }; ?>