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