/** * @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')); }
/** * @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); }