47 Laravelコマンドからコマンドヘルプを呼び出す

Laravelコマンドから引数が違う時などにヘルプを表示させたい。

下記のようにしておくと、指定の引数以外の時に対象コマンドのヘルプが表示されます。
$this→call('help',['command_name'⇒'コマンド名'])

protected $signature = 'command:TestCommand {arg : check 実行確認 | run 実行 }';

    public function handle()
    {
        $arg = $this->argument("arg");
        switch($arg){
            case 'check': $this->test = 1; break;
            case 'run'  : $this->test = 0; break;
            default:
                $this->call('help',['command_name'=>'command:TestCommand']);
                exit;
        }
    }