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