From 871c60b59d3eaaa1087197103c72f9306e7ba706 Mon Sep 17 00:00:00 2001 From: Jean Lalande Date: Thu, 10 Sep 2020 16:36:25 -0400 Subject: [PATCH] replace deprecated str_random function by Str::random (#12) --- src/Commands/CreateUser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Commands/CreateUser.php b/src/Commands/CreateUser.php index 554b51e..37f07ed 100644 --- a/src/Commands/CreateUser.php +++ b/src/Commands/CreateUser.php @@ -4,6 +4,7 @@ use BOAIdeas\CreateUser\Notifications\UserAccountCreated as UserAccountCreatedNotification; use Illuminate\Console\Command; +use Illuminate\Support\Str; use Validator; class CreateUser extends Command @@ -33,7 +34,7 @@ public function handle() $email = $this->validate_ask('Enter user email', ['email' => config('createuser.validation_rules.email')]); if ($this->confirm('Do you wish to create a random password?')) { - $password = str_random(8); + $password = Str::random(8); $this->info('*The randomly created password is: '.$password); } else { $password = $this->validate_ask('Enter user password', ['password' => config('createuser.validation_rules.password')], true);