📜  laravel 命令参数可选 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:13.245000             🧑  作者: Mango

代码示例1
protected $signature = 'order:check {--silent=y}'

  
  
public function handle()
{
$silent = $this->option('silent');
if ($this->confirm('This will run the command code continue?') || $silent) {