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