Update (UI)

This commit is contained in:
2023-12-03 10:15:08 +08:00
parent 8236db717b
commit 7844695b18
6 changed files with 33 additions and 69 deletions

View File

@@ -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);
}

View File

@@ -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();