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