search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $page = Plan::pushScope(new RequestScope()) ->pushScope(new PlanPublicScope()) ->paginate($pageLimit) ->withQueryString(); $plans = new PlansCollection($page); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('plan::plan.names')) ->view('plan::public.plan.index') ->data(compact('plans', 'categories', 'tags', 'recent')) ->output(); } /** * Show plan. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $model = Plan::findBySlug($slug); $data = new PlanResource($model); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('plan::plan.name')) ->view('plan::public.plan.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }