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