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