Browse Source

first iteration of search functionality - likely to fail hard

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

2
app/Http/Controllers/SearchController.php

@ -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)->distinct('hop_id');
$hops = Hopaddition::where('beer_id', $result->beer_id)->unique('hop_id');
$hoparr=array(); $hoparr=array();
$i = 0; $i = 0;
foreach ($hops as $hop){ foreach ($hops as $hop){

Loading…
Cancel
Save