このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
Tag Cloud
このページへのアクセス
今日: 2 / 昨日: 3
総計: 91
- Dokuwiki.fl8.jp(109)
- DokuWiki(22)
- インデックスメニューの設定(18)
- FreeBSD カーネル再構築(15)
- 01 Galera構築(13)
最近の更新
このページへのアクセス
今日: 2 / 昨日: 3
総計: 91
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; } }