/** * Display the specified resource. * * @param string $slug * * @return Response */ public function show($slug) { $post = $this->posts->findBySlug($slug); if (!$post) { return App::abort(404, 'Page not found'); } return View::make($this->theme . '.post', compact('post')); }
/** * Fetch post by slug * * @param string $slug * @return Post */ public function post($slug) { return $this->postsRepo->findBySlug($slug); }