|
@ -33,7 +33,7 @@ class SearchController extends Controller |
|
|
foreach ($results as $result) { |
|
|
foreach ($results as $result) { |
|
|
$brewery = Brewerie::where('id', $result->brewery_id)->value('name'); |
|
|
$brewery = Brewerie::where('id', $result->brewery_id)->value('name'); |
|
|
$result['brewery']=$brewery; |
|
|
$result['brewery']=$brewery; |
|
|
$hops = Hopaddition::where('beer_id', $result->beer_id)->unique('hop_id'); |
|
|
|
|
|
|
|
|
$hops = Hopaddition::where('beer_id', $result->beer_id)->distinct('hop_id')->get(); |
|
|
$hoparr=array(); |
|
|
$hoparr=array(); |
|
|
$i = 0; |
|
|
$i = 0; |
|
|
foreach ($hops as $hop){ |
|
|
foreach ($hops as $hop){ |
|
@ -59,7 +59,7 @@ class SearchController extends Controller |
|
|
$i++; |
|
|
$i++; |
|
|
}; |
|
|
}; |
|
|
$result['grains'] = $grainarr; |
|
|
$result['grains'] = $grainarr; |
|
|
$yeasts = Fermentation::where('beer_id', $result->beer_id)->value('yeast_id'); |
|
|
|
|
|
|
|
|
$yeasts = Fermentation::where('beer_id', $result->beer_id)->distinct('yeast_id')->get(); |
|
|
$yeastarr=array(); |
|
|
$yeastarr=array(); |
|
|
$i = 0; |
|
|
$i = 0; |
|
|
foreach ($yeasts as $yeast){ |
|
|
foreach ($yeasts as $yeast){ |
|
@ -72,7 +72,7 @@ class SearchController extends Controller |
|
|
$i++; |
|
|
$i++; |
|
|
}; |
|
|
}; |
|
|
$result['yeasts']=$yeastarr; |
|
|
$result['yeasts']=$yeastarr; |
|
|
$adjuncts = Adjunctaddition::where('beer_id', $result->beer_id)->distinct('adjunct_id'); |
|
|
|
|
|
|
|
|
$adjuncts = Adjunctaddition::where('beer_id', $result->beer_id)->distinct('adjunct_id')->get(); |
|
|
$adjunctarr = array(); |
|
|
$adjunctarr = array(); |
|
|
$i = 0; |
|
|
$i = 0; |
|
|
foreach ($adjuncts as $adjunct){ |
|
|
foreach ($adjuncts as $adjunct){ |
|
|