在普通代码调用Artisan命令
Route::get('test-artisan', function () {
$exitCode = Artisan::call('password:reset', [
'userId' => 15,
'--sendEmail' => true,
]);
});public function handle() {
$this->callSilent('password:reset', [
'userId' => 15,
]);
}Last updated