open-admin icon indicating copy to clipboard operation
open-admin copied to clipboard

Create admin user command error

Open snowcooled opened this issue 2 years ago • 1 comments

php artisan admin:create-user

Please enter a username to login:

admin

Please enter a password to login:

Please enter a name to display:

Administrator

LogicException

Choice question must have at least 1 choice available.

at vendor/symfony/console/Question/ChoiceQuestion.php:36 32▕ */ 33▕ public function __construct(string $question, array $choices, mixed $default = null) 34▕ { 35▕ if (!$choices) { ➜ 36▕ throw new \LogicException('Choice question must have at least 1 choice available.'); 37▕ } 38▕ 39▕ parent::__construct($question, $default); 40▕

  +14 vendor frames 

15 artisan:37 Illuminate\Foundation\Console\Kernel::handle()

snowcooled avatar Nov 10 '23 03:11 snowcooled

Likely you removed the Administrator role (or all roles) from you admin_roles table. There is at leas one role required.

open-admin-org avatar Nov 24 '23 15:11 open-admin-org