Custom Artisan commands:
Create Command
php artisan make:command SendEmailsCommand Class
class SendEmails extends Command
{
protected $signature = \'emails:send {user} {--queue}\';
protected $description = 'Send emails to user';
public function handle()
{
$userId = $this->argument('user');
$queue = $this->option('queue');
$this->info('Sending emails...');
$this->line('Done!');
}
}Interactive Input
$name = $this->ask('What is your name?');
$confirmed = $this->confirm('Continue?');
$choice = $this->choice('Select', ['a', 'b']);