public function show($slug) { $post = Post::slug($slug); if ($post) { if ($post->isPublished()) { return view('post.show')->with('post', $post); } else { App::abort(404); } } else { App::abort(404); } }