예제 #1
0
 /**
  * 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'));
 }
예제 #2
0
파일: Wardrobe.php 프로젝트: sekouzed/core
 /**
  * Fetch post by slug
  *
  * @param string $slug
  * @return Post
  */
 public function post($slug)
 {
     return $this->postsRepo->findBySlug($slug);
 }