|
|
@ -24,7 +24,7 @@ class SearchController extends Controller |
|
|
|
$table = $request->input('table'); |
|
|
|
|
|
|
|
switch($table) { |
|
|
|
case('summaries'): |
|
|
|
case('summarie'): |
|
|
|
$results = Summarie::where('keywords', 'LIKE', '%'.$search.'%')->orWhere('type', 'LIKE', '%'.$search.'%')->get(); |
|
|
|
foreach ($results as $result) { |
|
|
|
$brewery = Brewerie::where('id', $result->brewery_id)->value('name'); |
|
|
@ -67,13 +67,13 @@ class SearchController extends Controller |
|
|
|
}; |
|
|
|
} |
|
|
|
break; |
|
|
|
case('breweries'): |
|
|
|
case('brewerie'): |
|
|
|
|
|
|
|
break; |
|
|
|
case('hops'): |
|
|
|
|
|
|
|
break; |
|
|
|
case('yeasts'): |
|
|
|
case('yeast'): |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
|