Update (kernel)
This commit is contained in:
@@ -76,9 +76,9 @@ public function index(Request $request)
|
||||
SEOTools::setTitle($title, false);
|
||||
|
||||
$posts = Post::with('category')->where('status', 'publish')
|
||||
->where('published_at', '<=', now())
|
||||
->orderBy('published_at', 'desc')
|
||||
->cursorPaginate(10) ?? collect();
|
||||
->where('published_at', '<=', now())
|
||||
->orderBy('published_at', 'desc')
|
||||
->cursorPaginate(10) ?? collect();
|
||||
|
||||
// breadcrumb json ld
|
||||
$listItems = [];
|
||||
@@ -124,10 +124,10 @@ public function category(Request $request, $category_slug)
|
||||
// Get the posts associated with these category IDs
|
||||
$postIds = PostCategory::whereIn('category_id', $categoryIds)->pluck('post_id');
|
||||
$posts = Post::whereIn('id', $postIds)
|
||||
->where('published_at', '<=', now())
|
||||
->where('status', 'publish')
|
||||
->orderBy('published_at', 'desc')
|
||||
->cursorPaginate(10);
|
||||
->where('published_at', '<=', now())
|
||||
->where('status', 'publish')
|
||||
->orderBy('published_at', 'desc')
|
||||
->cursorPaginate(10);
|
||||
|
||||
$title = $category->name.' News from FutureWalker';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user