Пример #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
 /**
  * @return \Notadd\Category\Category
  */
 public function getCategory()
 {
     return $this->article->getCategory();
 }