php artisan make:command <command_name> //Check https://www.cloudways.com/blog/custom-artisan-commands-laravel/ //for full tutorialphp artisan make:command SendEmailsphp artisan make:command CommandNamephp artisan make:command SendEmail php artisan make:<whatToMake> <nameOfWhatToMake> make:channel Create a new channel class make:command Create a new Artisan command make:controller Create a new controller class make:event Create a new event class make:exception Create a new custom exception class make:factory Create a new model factory make:job Create a new job class make:listener Create a new event listener class make:mail Create a new email class make:middleware Create a new middleware class make:migration Create a new migration file make:model Create a new Eloquent model class make:notification Create a new notification class make:observer Create a new observer class make:policy Create a new policy class make:provider Create a new service provider class make:request Create a new form request class make:resource Create a new resource make:rule Create a new validation rule make:seeder Create a new seeder class make:test Create a new test classArtisan::command('build {project}', function ($project) { $this->info("Building {$project}!"); })->describe('Build the project');<?php namespace App\Console\Commands; use App\Models\User; use App\Support\DripEmailer; use Illuminate\Console\Command; class SendEmails extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'email:send {user}'; /** * The console command description. * * @var string */ protected $description = 'Send drip e-mails to a user'; /** * Create a new command instance. * * @return void */ public function __construct() { parent::__construct(); } /** * Execute the console command. * * @param \App\Support\DripEmailer $drip * @return mixed */ public function handle(DripEmailer $drip) { $drip->send(User::find($this->argument('user'))); } }$arguments = $this->arguments();/** * The name and signature of the console command. * * @var string */ protected $signature = 'email:send {user} {--queue}';// Optional argument... email:send {user?} // Optional argument with default value... email:send {user=foo}if ($this->confirm('Do you wish to continue?')) { // }