From 64abf3c42ef514afa164e20ff511cef25435e57b Mon Sep 17 00:00:00 2001 From: jk Date: Thu, 24 Jun 2021 16:29:58 +0100 Subject: [PATCH] first iteration of search functionality - likely to fail hard --- app/Http/Controllers/SearchController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 7c5f94b..0d8f873 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -90,7 +90,7 @@ class SearchController extends Controller $i = 0; foreach ($mashes as $mash){ if ($mash->stage == 1) { - $result->boil = $mash->boil; + $result['boil'] = $mash->boil; } if ($i == 0){ $masharr[] = array('id'=>$mash->id, 'stage'=>$mash->stage, 'duration'=>$mash->duration); @@ -101,6 +101,7 @@ class SearchController extends Controller }; $results['mashes']=$masharr; $hopadditions = Hopaddition::where('beer_id', $result->beer_id)->distinct('timing')->get(); + $results['hopadditions'] = $hoppaditions; } break; case('brewerie'):