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