예제 #1
0
 /**
  * Show article.
  *
  * @param  int $idFormFacade
  * @return mixed
  */
 public function getArticle($id)
 {
     try {
         $post = Article::with('user', 'category')->whereId(intval($id))->orWhere('slug', $id)->firstOrFail();
         $view = config('admin.views.post');
         return view($view, compact('post'));
     } catch (ModelNotFoundException $e) {
         abort(404);
     }
     return false;
 }