From f2fe73fde23892196237ab7e1feddd5983e469c0 Mon Sep 17 00:00:00 2001 From: jk Date: Thu, 24 Jun 2021 15:51:24 +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 2fb4ae4..8371fd7 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -59,7 +59,7 @@ class SearchController extends Controller $i++; }; $result['grains'] = $grainarr; - $yeasts = Fermentation::where('beer_id', $result->beer_id)->distinct('yeast_id'); + $yeasts = Fermentation::where('beer_id', $result->beer_id)->value('yeast_id'); $yeastarr=array(); $i = 0; foreach ($yeasts as $yeast){