예제 #1
0
 /**
  * @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());
 }
예제 #2
0
 /**
  * @param $template
  */
 public function setArticleShowTemplate($template)
 {
     $this->article->getModel()->setShowTemplate($template);
 }