orderBy('published_at', 'desc')->simplePaginate(10) ?? collect(); return view('front.post_list', compact('posts')); } public function category(Request $request, $category_slug) { $category = Category::where('slug', $category_slug)->first(); $posts = $category?->posts()->where('status', 'publish')->orderBy('published_at', 'desc')->simplePaginate(10) ?? collect(); $title = $category->name.' News from EchoScoop'; SEOTools::metatags(); SEOTools::twitter(); SEOTools::opengraph(); SEOTools::jsonLd(); SEOTools::setTitle($title, false); return view('front.post_list', compact('category', 'posts')); } }