From f55beab8cc0bcae82c2639813346165ec9edfb5d Mon Sep 17 00:00:00 2001 From: jk Date: Tue, 22 Jun 2021 09:55:36 +0100 Subject: [PATCH] beers refactor mkIII --- 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 6dfb959..73d55f4 100644 --- a/app/Http/Controllers/SummarieController.php +++ b/app/Http/Controllers/SummarieController.php @@ -71,7 +71,7 @@ class SummarieController extends Controller } public function edit($id){ - $beer = Summarie::where('id', (int)$id)->first(); + $beer = Summarie::where('beer_id', (int)$id)->first(); return view('beers.edit')->with('beer', $beer); } @@ -90,7 +90,7 @@ class SummarieController extends Controller 'brewery_id' => 'required' ]); - $beer = Summarie::where('id', $id)->first(); + $beer = Summarie::where('beer_id', $id)->first(); $beer->name = $request->input('name'); $beer->type = $request->input('type'); $beer->abv = $request->input('abv');