summaryrefslogtreecommitdiff
path: root/site/app/Http/Controllers/SearchController.php
diff options
context:
space:
mode:
authorhorus2018-02-14 15:37:50 +0100
committerhorus2018-02-14 15:39:52 +0100
commit9658e695c6a6ee36fbc12a9b66a9bf5f91799719 (patch)
tree8a8d763b3d70f8d87872fb283542ea11f4593352 /site/app/Http/Controllers/SearchController.php
parent6ff78f33a75fbabae300497c452112f57bbfab6a (diff)
downloadalkobote-9658e695c6a6ee36fbc12a9b66a9bf5f91799719.tar.gz
Improves styling, rss feeds and pagination.
Diffstat (limited to 'site/app/Http/Controllers/SearchController.php')
-rw-r--r--site/app/Http/Controllers/SearchController.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/site/app/Http/Controllers/SearchController.php b/site/app/Http/Controllers/SearchController.php
index bb79bae..45014d3 100644
--- a/site/app/Http/Controllers/SearchController.php
+++ b/site/app/Http/Controllers/SearchController.php
@@ -68,7 +68,14 @@ class SearchController extends Controller {
#$data = DB::table('whisky_view')->orderBy('procent', 'DESC')->limit(100)->simplePaginate(20);
#var_dump($data); exit;
- return view('search', ['data' => $data, 'search_phrase' => $query ]);
+ $query_string = "";
+ $query_params = Input::get();
+ foreach( $query_params as $key => $value) {
+ $query_string .= "&" . $key . "=" . $value;
+ }
+ $query_string = ltrim($query_string, "&");
+
+ return view('search', ['data' => $data, 'search_phrase' => $query, 'rss_feed' => '/search/feed/?' . $query_string ]);
}
private function escapeLike($string) {