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