From 3eb3a972ff0c39f6e548efa7dd4cd7e8dac5fc6f Mon Sep 17 00:00:00 2001 From: JakubKermes Date: Thu, 4 Apr 2024 15:56:28 +0200 Subject: [PATCH] fix updating opinion --- app/Http/Controllers/CityOpinionController.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Http/Controllers/CityOpinionController.php b/app/Http/Controllers/CityOpinionController.php index 8ca3f15d..82673821 100644 --- a/app/Http/Controllers/CityOpinionController.php +++ b/app/Http/Controllers/CityOpinionController.php @@ -18,9 +18,7 @@ public function store(CityOpinionRequest $request): void public function update(CityOpinionRequest $request, CityOpinion $cityOpinion): void { - $request->user() - ->cityOpinions() - ->update($request->validated()); + $cityOpinion->update($request->validated()); } public function destroy(CityOpinion $cityOpinion): void