From e9d9d069ba8d48166c90de92cbb4bdc070962cf2 Mon Sep 17 00:00:00 2001 From: jk Date: Thu, 24 Jun 2021 14:02:42 +0100 Subject: [PATCH] first iteration of search functionality - likely to fail hard --- app/Http/Controllers/SearchController.php | 3 +- resources/views/search/results.blade.php | 70 ++++++++++++++++------- 2 files changed, 50 insertions(+), 23 deletions(-) diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 008bae3..72da383 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -83,6 +83,7 @@ class SearchController extends Controller default: $msg = "You fucked up somehow!"; } - return view('search.results')->with('results',$results); + $data = array('results'=>$results, 'table'=>$table); + return view('search.results')->with($data); } } diff --git a/resources/views/search/results.blade.php b/resources/views/search/results.blade.php index 5faf550..225d33a 100644 --- a/resources/views/search/results.blade.php +++ b/resources/views/search/results.blade.php @@ -7,29 +7,55 @@
@include('inc.navbar')
Home -> {{ __('Search Results') }}Go Back
-
- - - @include('inc.messages') - - - - - - - - - - @foreach ($results as $result) - - - - - - @endforeach - -
@sortablelink('name')@sortablelink('brewery')@sortablelink('type', 'Style')
{{$result->name}} {{$result->brewery}} {{$result->type}}
+ @if ($table == "summarie") +
+ +
+
+
    +
  • + + + @include('inc.messages') + + + + + + + + + @foreach ($results as $result) + + + + + + @endforeach + +
    @sortablelink('name', 'Beer')Brewery@sortablelink('type', 'Style')
    {{$result->name}} {{$result->brewery}} {{$result->type}}
    +
  • +
+
+
+
+
+
+ @endif