From 28fa1db4f15a091145054c5e17672606af375a05 Mon Sep 17 00:00:00 2001 From: jk Date: Thu, 24 Jun 2021 09:43:11 +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 6fe3da2..92260cc 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -26,7 +26,7 @@ class SearchController extends Controller switch($table) { case('summaries'): $results = Summarie::where('keywords', 'LIKE', '%'.$search.'%')->orWhere('type', 'LIKE', '%'.$search.'%')->get(); - foreach ($results as result) { + foreach ($results as $result) { $brewery = Brewerie::where('id', $result->brewery_id)->value('name'); $result['brewery']=$brewery; $hops = Hopaddition::where('beer_id', $result->beer_id)->distinct('hop_id');