modules = $this->modules(config('litecms.series.modules'), 'series', guard_url('series')); $this->repository = $series; } /** * Show series'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(SeriesPublicFilter::class) ->setPresenter(SeriesListPresenter::class) ->select('series.*') ->paginate($pageLimit) ->withQueryString() ->toArray(); extract($data); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('series::series.names')) ->view('series::public.series.index') ->data(compact('data', 'meta', 'categories', 'tags', 'recent')) ->output(); } /** * Show series. * * @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('series::series.name')) ->view('series::public.series.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }