fix user:create command wording
This commit is contained in:
parent
dc8613885b
commit
5fed08e8f0
1 changed files with 10 additions and 5 deletions
|
|
@ -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], [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue