add nova
This commit is contained in:
37
nova/src/Console/UserCommand.php
Normal file
37
nova/src/Console/UserCommand.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Laravel\Nova\Console;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Laravel\Nova\Nova;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
#[AsCommand(name: 'nova:user')]
|
||||
class UserCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'nova:user';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Create a new user';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
Nova::createUser($this);
|
||||
|
||||
$this->info('User created successfully.');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user