Browse Source

first iteration of search functionality - likely to fail hard

master
jk 3 years ago
parent
commit
9b109e50a7
  1. 2
      app/Http/Controllers/SearchController.php

2
app/Http/Controllers/SearchController.php

@ -42,7 +42,7 @@ class SearchController extends Controller
$result['hops'][$i]['name'] = $hopname;
$i++;
};
$grains = Grainbill::where('beer_id', $result->beer_id)->distinct('grain_id');
$grains = Grainbill::where('beer_id', $result->beer_id)->get();
$grainarr = array();
foreach ($grains as $grain){
$grainname = Grain::where('id', $grain->grain_id)->value('name');

Loading…
Cancel
Save