user(); $customer = $this->customerService->updateProfile( customer: $customer, attributes: $request->customerAttributes(), shippingAddress: $request->shippingAddress(), billingAddress: $request->billingAddress(), ); if ((bool) $request->validated('is_customer_avatar_removed', false)) { $this->customerAvatarManager->clear($customer); } $avatar = $request->file('customer_avatar'); if ($avatar) { $this->customerAvatarManager->replace( $customer, $avatar->getPathname(), $avatar->getClientOriginalName(), ); } return CustomerResource::make($customer); } public function getUser(Request $request) { return CustomerResource::make(auth('customer')->user()); } }