/** * Display the specified resource. * * @param string $slug The slug identifier for the article * * @return \Illuminate\Http\Response */ public function show($slug) { try { $article = \ArticleRepository::load($slug); $theme = \ThemeLoader::load(); $rendered_article = \ArticleRenderer::render($article, $theme); return response($rendered_article, 200); } catch (ArticleNotFoundException $e) { return response("article not found", 404); } }
/** * Load the dashbaord. * ダッシュボードをロード。 * * @return View valid view of dashboard. */ public function getDashboard() { $articles = \ArticleRepository::index(); $structures = \StructureLoader::index(); return view('admin.dashboard', ['articles' => $articles, 'structures' => $structures]); }