自作コマンドのオプション取得方法
php artisan awk:shodoku -d
というオプションを設定したい場合は以下のようにする。
/** * Get the console command options. * * @return array */ protected function getOptions() { return array( array('drop', 'd', InputOption::VALUE_NONE, 'An example option.', null), ); }
これで「$this->option('drop')」の結果が真偽値になる。