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