Browse Source

first iteration of search functionality - likely to fail hard

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

2
app/Http/Controllers/SearchController.php

@ -46,7 +46,7 @@ class SearchController extends Controller
$grainarr = array();
foreach ($grains as $grain){
$grainname = Grain::where('id', $grain->id)->value('name');
$grainarr[] = array('id'=>$grain->id, 'name'=>$grainname);
array_push($grainarr, array('id'=>$grain->id, 'name'=>$grainname));
};
$result['grains'] = $grainarr;
$yeasts = Fermentation::where('beer_id', $result->beer_id)->distinct('yeast_id');

Loading…
Cancel
Save