diff --git a/src/Commands/CreateSuperAdmin.php b/src/Commands/CreateSuperAdmin.php index 33a97211b..d81c4f79a 100644 --- a/src/Commands/CreateSuperAdmin.php +++ b/src/Commands/CreateSuperAdmin.php @@ -14,7 +14,7 @@ class CreateSuperAdmin extends Command * * @var string */ - protected $signature = 'twill:superadmin'; + protected $signature = 'twill:superadmin {email?} {password?}'; /** * The console command description. @@ -76,6 +76,9 @@ public function handle() */ private function setEmail() { + if (filled($email = $this->argument('email'))) { + return $email; + } $email = $this->ask('Enter an email'); if ($this->validateEmail($email)) { return $email; @@ -92,6 +95,9 @@ private function setEmail() */ private function setPassword() { + if (filled($email = $this->argument('password'))) { + return $email; + } $password = $this->secret('Enter a password'); if ($this->validatePassword($password)) { $confirmPassword = $this->secret('Confirm the password');