*/ public function rules(): array { return [ 'name' => 'required', 'email' => 'required|email|unique:users,email,' . auth()->user()->id, 'current_password' => 'sometimes|required_with:new_password', 'new_password' => ['sometimes', Password::defaults()], ]; } }