php artisan list
php artisan help migrate
Tinker 让你可以在命令行中与 Laravel 应用进行交互php artisan tinker
在routes/console.php里面可以加闭包命令
Artisan::command('build {project}', function ($project) {
$this->info("Building {$project}!");
})->describe('Build the project, yeah');
php artisan build elesos
参数及选项都包在大括号中
不接收值的选项,当在命令中写出时,值为true,不写表示false
注册app/Console/Kernel.php
protected $commands = [ Commands\SendEmails::class ];
Route::get('/foo', function () { $exitCode = Artisan::call('email:send', [ 'user' => 1, '--queue' => 'default' ]); // });
还可以命令中调用其它命令

相关文章:

  • 2021-06-09
  • 2021-07-20
  • 2021-08-11
  • 2021-12-20
  • 2021-08-15
  • 2021-08-31
  • 2021-04-25
  • 2022-12-23
猜你喜欢
  • 2022-01-23
  • 2021-11-25
  • 2021-08-18
  • 2021-06-23
  • 2021-07-20
  • 2021-12-09
  • 2021-11-25
相关资源
相似解决方案