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