Update (fixes)
This commit is contained in:
@@ -28,7 +28,7 @@ public function searchResults(Request $request, $query)
|
||||
|
||||
$breadcrumbs = collect([
|
||||
['name' => 'Home', 'url' => route('front.home')],
|
||||
['name' => 'News Bites', 'url' => route('front.search.results',['query' => $query])],
|
||||
['name' => 'News Bites', 'url' => route('front.all')],
|
||||
['name' => $query, 'url' => null],
|
||||
]);
|
||||
|
||||
@@ -42,7 +42,7 @@ public function searchResults(Request $request, $query)
|
||||
|
||||
$rss_posts = RssPost::with('category')
|
||||
->where('status', 'published')
|
||||
->whereRaw("to_tsvector('english', title || ' ' || bites || ' ' || body) @@ plainto_tsquery('english', ?)", [trim(preg_replace('/\s+/', ' ', $query))])
|
||||
->whereRaw("to_tsvector('english', title || ' ' || bites || ' ' || keyword_list) @@ plainto_tsquery('english', ?)", [trim(preg_replace('/\s+/', ' ', $query))])
|
||||
->where('published_at', '<=', now())
|
||||
->orderBy('published_at', 'desc')
|
||||
->cursorPaginate(60);
|
||||
|
||||
Reference in New Issue
Block a user