From 4765ed13dc1a6fef7355a97ffe2c6e4415bfbc6a Mon Sep 17 00:00:00 2001 From: jk Date: Thu, 24 Jun 2021 15:03:20 +0100 Subject: [PATCH] first iteration of search functionality - likely to fail hard --- app/Http/Controllers/SearchController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index d7751df..dff6096 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -42,7 +42,7 @@ class SearchController extends Controller $result['hops'][$i]['name'] = $hopname; $i++; }; - $grains = Grainbill::where('beer_id', $result->beer_id)->value('grain_id'); + $grains = Grainbill::where('beer_id', $result->beer_id)->pluck('grain_id'); $grainarr = array(); foreach ($grains as $grain){ $grainname = Grain::where('id', $grain->id)->value('name');