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