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