1234567891011121314151617181920212223242526272829 |
- <?php
- namespace App;
- use Illuminate\Console\Command;
- class ComposerConfigCommand extends Command
- {
- protected $signature = 'admin:composer-config';
- public function handle()
- {
- $composer = base_path('composer.json');
- /* @var \Illuminate\Filesystem\Filesystem $files */
- $files = app('files');
- $contents = json_decode($files->get($composer), true);
- $contents['repositories'] = [
- [
- 'type' => 'path',
- 'url' => './dcat-admin',
- ],
- ];
- $files->put($composer, str_replace('\\/', '/', json_encode($contents)));
- }
- }
|