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