基于闭包的命令
// routes/console.php
Artisan::command(
'password:reset {userId} {--sendEmail}', function ($userId, $sendEmail) {
$userId = $this->argument('userId'); // Do something...
});Last updated
// routes/console.php
Artisan::command(
'password:reset {userId} {--sendEmail}', function ($userId, $sendEmail) {
$userId = $this->argument('userId'); // Do something...
});Last updated