diff --git a/app/Console/Commands/CreateEditorAccount.php b/app/Console/Commands/CreateEditorAccount.php new file mode 100644 index 0000000..b289f89 --- /dev/null +++ b/app/Console/Commands/CreateEditorAccount.php @@ -0,0 +1,57 @@ +argument('email'); + $password = $this->argument('password'); + + $user = User::create([ + 'email' => $email, + 'password' => Hash::make($password), + 'api_token' => Str::random(36) + ]); + + $user->assignRole('editor'); + + $this->info("Account: $email has been created"); + } +}