/** * @param int $id * @return \Illuminate\Contracts\View\View */ public function show($id) { $article = new Article($id); $this->events->fire(new OnArticleShow($this->app, $this->view, $article)); $this->share('title', $article->getTitle()); $this->share('content', $article->getContent()); $this->share('category', $article->getCategory()); $this->share('relations', $article->getCategory()->getRelationCategoryList()); return $this->view($article->getShowTemplate()); }
/** * @param $template */ public function setArticleShowTemplate($template) { $this->article->getModel()->setShowTemplate($template); }