From a29b756f696cd9d54ff825f2dc6246a5609cf15f Mon Sep 17 00:00:00 2001 From: jk Date: Tue, 22 Jun 2021 09:53:01 +0100 Subject: [PATCH] beers refactor mkII --- 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 4b4c54d..6dfb959 100644 --- a/app/Http/Controllers/SummarieController.php +++ b/app/Http/Controllers/SummarieController.php @@ -19,8 +19,8 @@ class SummarieController extends Controller $beers = Summarie::orderBy('name')->get(); foreach ($beers as $beer) { - $beer = DB::table('breweries')->where('id', $beer->beer_id)->value('name'); - $beer['beer'] = $beer; + $brewery = DB::table('breweries')->where('id', $beer->beer_id)->value('name'); + $beer['brewery'] = $brewery; } return view('beers.index')->with('beers', $beers); }