robinhoo1973 /
laravel-translation-helper
| 1 | <?php |
||
| 2 | |||
| 3 | namespace TopviewDigital\TranslationHelper\Console; |
||
| 4 | |||
| 5 | use Illuminate\Console\Command; |
||
| 6 | |||
| 7 | class PublishCommand extends Command |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The console command name. |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $signature = 'trans-helper:publish {--force}'; |
||
| 15 | /** |
||
| 16 | * The console command description. |
||
| 17 | * |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | protected $description = "publish translation helper's assets, configuration, config and migration files. If you want overwrite the existing files, you can add the `--force` option"; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Execute the console command. |
||
| 24 | * |
||
| 25 | * @return void |
||
| 26 | */ |
||
| 27 | public function handle() |
||
| 28 | { |
||
| 29 | $force = $this->option('force'); |
||
| 30 | $options = ['--provider' => 'TopviewDigital\TranslationHelper\TranslationHelperServiceProvider']; |
||
| 31 | if ($force == true) { |
||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 32 | $options['--force'] = true; |
||
| 33 | } |
||
| 34 | $this->call('vendor:publish', $options); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |