repository = $live_feed; parent::__construct(); } /** * Show live_feed's list. * * @param string $slug * * @return response */ protected function index() { $live_feeds = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->response->setMetaTitle(trans('livefeed::live_feed.names')) ->view('livefeed::public.live_feed.index') ->data(compact('live_feeds')) ->output(); } /** * Show live_feed. * * @param string $slug * * @return response */ protected function show($slug) { $live_feed = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->response->setMetaTitle($live_feed->name . trans('livefeed::live_feed.name')) ->view('livefeed::public.live_feed.show') ->data(compact('live_feed')) ->output(); } }