modules = $this->modules(config('litecms.video_archive.modules'), 'video_archive', guard_url('video_archive')); $this->repository = $video_archive; } /** * Show video_archive's list. * * @return response */ protected function index(PublicRequest $request) { $search = $request->search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $data = $this->repository ->pushFilter(RequestFilter::class) ->pushFilter(VideoArchivePublicFilter::class) ->setPresenter(VideoArchiveListPresenter::class) ->select('video_archives.*') ->paginate($pageLimit) ->withQueryString() ->toArray(); extract($data); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('video_archive::video_archive.names')) ->view('video_archive::public.video_archive.index') ->data(compact('data', 'meta', 'categories', 'tags', 'recent')) ->output(); } /** * Show video_archive. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $data = $this->repository ->findBySlug($slug) ->toArray(); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('video_archive::video_archive.name')) ->view('video_archive::public.video_archive.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }