Customize php artisan filament:user
Hi, instead of name I have firstname and lastname in my users table.
When I run: php artisan filament:user, it needs a name. How do I update this so it prompts for firstname and lastname?
Thanks in advance. 🙂
3 Replies
Maybe you can extend the command and make your own. Just override the
getUserData
method + command signatureYou can create your own command for feature usage;
php artisan make:command FilamentManualUser
This code generate file in 'app/Console/Commands', open it. Then use this for example;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'filament:manual-user';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Create a user';
/**
* Execute the console command.
*/
public function handle()
{
$name = $this->ask('What is your name?');
$surname = $this->ask('What is your surname?');
$email = $this->ask('What is your email?');
$password = $this->secret('Write password?');
if ($this->confirm('Do you wish to create a user with thise info?')) {
// ... in here you can use classic User::create()
}
}
Hi I have a challenge when i run the configuration command I cannot find the options of removing dark theme and also the sidebar configurations are not there as described in the documentation