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