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