fix bug can't update profile information

This commit is contained in:
Geriano
2022-07-31 13:17:08 +07:00
parent e9dd80bdfb
commit 57b028c80d

View File

@@ -21,7 +21,6 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
Validator::make($input, [
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)],
'username' => ['required', 'max:255', Rule::unique('users')->ignore($user->id)],
'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:1024'],
])->validateWithBag('updateProfileInformation');
@@ -36,7 +35,6 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
$user->forceFill([
'name' => mb_strtolower($input['name']),
'email' => mb_strtolower($input['email']),
'username' => mb_strtolower($input['username']),
])->save();
}
}