where('published', true)->firstOrFail(); return view('shop.page', compact('page')); } public function blog() { $posts = Page::where('type', 'blog')->where('published', true)->latest('published_at')->paginate(10); return view('shop.blog.index', compact('posts')); } public function blogPost(string $slug) { $post = Page::where('slug', $slug)->where('type', 'blog')->where('published', true)->firstOrFail(); return view('shop.blog.post', compact('post')); } }