diff --git a/app/Console/Commands/UserCreate.php b/app/Console/Commands/UserCreate.php index df4417b..2bf8d40 100644 --- a/app/Console/Commands/UserCreate.php +++ b/app/Console/Commands/UserCreate.php @@ -8,6 +8,7 @@ use Carbon\Carbon; use Illuminate\Console\Command; use Illuminate\Support\Facades\Validator; use Illuminate\Validation\ValidationException; +use Illuminate\Support\Str; class UserCreate extends Command { @@ -200,18 +201,22 @@ class UserCreate extends Command try { $tmp = $this->choice( 'Select his role', - [RoleEnum::conceptor->label(), RoleEnum::admin->label(), RoleEnum::visitor->label()], - RoleEnum::visitor->label(), + [ + Str::ucFirst(RoleEnum::conceptor->label()), + Str::ucFirst(RoleEnum::admin->label()), + Str::ucFirst(RoleEnum::visitor->label()) + ], + Str::ucFirst(RoleEnum::visitor->label()), $maxAttempts = null, $allowMultipleSelections = false ); - if ($tmp === RoleEnum::conceptor->label()) { + if ($tmp === Str::ucFirst(RoleEnum::conceptor->label())) { $tmp = RoleEnum::conceptor; } - if ($tmp === RoleEnum::admin->label()) { + if ($tmp === Str::ucFirst(RoleEnum::admin->label())) { $tmp = RoleEnum::admin; } - if ($tmp === RoleEnum::visitor->label()) { + if ($tmp === Str::ucFirst(RoleEnum::visitor->label())) { $tmp = RoleEnum::visitor; } $validator = Validator::make(['role' => $tmp], [