Skip to content

Commit

Permalink
Merge pull request #13 from MartaKhimich/master
Browse files Browse the repository at this point in the history
Добавила ввод email при создании user через консоль
  • Loading branch information
toyrik authored Mar 7, 2024
2 parents 2abcee3 + 1ba3c6b commit f8ad4e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Console/Commands/UserCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ public function handle(): void
$password =$this->validate_ask('Enter user password', ['string|min:6']);
}

$email = $this->validate_ask('Enter email', ['email']);

$user = new User();
$user->username = $username;
$user->password = bcrypt($password);
$user->email = $email;
$user->email_verified_at = now();
$user->save();

$this->info('User created');
Expand Down

0 comments on commit f8ad4e4

Please sign in to comment.