Browse Source

first iteration of search functionality - likely to fail hard

master
jk 3 years ago
parent
commit
28fa1db4f1
  1. 2
      app/Http/Controllers/SearchController.php

2
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');

Loading…
Cancel
Save