Update (UI)
This commit is contained in:
@@ -28,7 +28,7 @@ public function home(Request $request)
|
||||
|
||||
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 16);
|
||||
|
||||
$rss_posts = RssPost::with('entities_keywords')->where('status', 'published')->orderBy('published_at', 'desc')->paginate(15);
|
||||
$rss_posts = RssPost::with('entities_keywords')->whereNotNull('keywords')->where('status', 'published')->orderBy('published_at', 'desc')->paginate(15);
|
||||
|
||||
return response(view('front.welcome', compact('rss_posts', 'top_rss_keywords')), 200);
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ public function searchResults(Request $request, $query)
|
||||
|
||||
$rss_posts = RssPost::with('category', 'entities_keywords')
|
||||
->where('status', 'published')
|
||||
->whereNotNull('keywords')
|
||||
->whereRaw("to_tsvector('english', title || ' ' || bites || ' ' || keyword_list) @@ plainto_tsquery('english', ?)", [trim(preg_replace('/\s+/', ' ', $query))])
|
||||
->where('published_at', '<=', now())
|
||||
->orderBy('published_at', 'desc')
|
||||
@@ -106,6 +107,7 @@ public function index(Request $request)
|
||||
//SEOTools::setDescription($description);
|
||||
|
||||
$rss_posts = RssPost::with('category', 'entities_keywords')->where('status', 'published')
|
||||
->whereNotNull('keywords')
|
||||
->where('published_at', '<=', now())
|
||||
->orderBy('published_at', 'desc')
|
||||
->cursorPaginate(60) ?? collect();
|
||||
|
||||
Reference in New Issue
Block a user