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