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