Esempio n. 1
0
 /**
  * @param $id
  * @return \Illuminate\View\View
  */
 public function show($slug)
 {
     $news = $this->news->getBySlug($slug);
     if ($news === null) {
         return Response::view('errors.missing', array(), 404);
     }
     return view('frontend.news.show', compact('news'));
 }
Esempio n. 2
0
 /**
  * @param $view
  */
 public function compose($view)
 {
     $news = $this->news->getLastNews(5);
     $view->with('news', $news);
 }
 /**
  * @param null $perPage
  * @param bool $all
  * @return mixed
  */
 public function paginate($page = 1, $limit = 10, $all = false)
 {
     return $this->news->paginate($page, $limit, $all);
 }