Ejemplo n.º 1
0
 protected function getArticle()
 {
     if ($this->category) {
         $art = $this->route('id');
         if (!is_null($art)) {
             $this->article = Article::findArticle($this->category->id, $art);
         }
     }
 }
Ejemplo n.º 2
0
 protected function getArticle()
 {
     if ($this->category) {
         $art = $this->request->route('article');
         if (Auth::check()) {
             $this->article = Article::findAdminArticle($this->category->id, $art);
         } else {
             $this->article = Article::findPublicArticle($this->category->id, $art);
         }
     }
 }
Ejemplo n.º 3
0
 public function getSlug()
 {
     $title = $this->request->input('title', '');
     return Article::makeSlug($title);
 }