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