fix: Sostituito 'name' con 'username' nella creazione di un utente

This commit is contained in:
Maicol Battistini 2023-12-06 21:26:00 +01:00
parent 598030e40f
commit e409fcb0d2
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ class CreateNewUser implements CreatesNewUsers
public function create(array $input): User
{
Validator::make($input, [
'name' => ['required', 'string', 'max:255'],
'username' => ['required', 'string', 'max:255'],
'email' => [
'required',
'string',
@ -32,7 +32,7 @@ class CreateNewUser implements CreatesNewUsers
])->validate();
return User::create([
'name' => $input['name'],
'username' => $input['username'],
'email' => $input['email'],
'password' => Hash::make($input['password']),
]);