From 1d11eb05c90527e4a4737d2eadb4ea445429c9cb Mon Sep 17 00:00:00 2001 From: jk Date: Tue, 22 Jun 2021 10:42:10 +0100 Subject: [PATCH] beers refactor mkXVI --- app/Http/Controllers/SummarieController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/SummarieController.php b/app/Http/Controllers/SummarieController.php index 760668f..0ba2599 100644 --- a/app/Http/Controllers/SummarieController.php +++ b/app/Http/Controllers/SummarieController.php @@ -88,8 +88,8 @@ class SummarieController extends Controller 'brewery_id' => 'required' ]); - $beer = Summarie::where('beer_id', $id)->first(); - $beer->beer_id=$request->input('beer_id'); + $beer = Summarie::where('beer_id', (int)$id)->first(); + $beer->beer_id=$beer->beer_id; $beer->name = $request->input('name'); $beer->type = $request->input('type'); $beer->abv = $request->input('abv');