Browse Source

beers refactor mkII

master
jk 3 years ago
parent
commit
a29b756f69
  1. 4
      app/Http/Controllers/SummarieController.php

4
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);
}

Loading…
Cancel
Save