Browse Source

first iteration of search functionality - likely to fail hard

master
jk 3 years ago
parent
commit
66f12ca6dc
  1. 6
      app/Http/Controllers/SearchController.php

6
app/Http/Controllers/SearchController.php

@ -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:

Loading…
Cancel
Save