海工商新版后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
639 B

<?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)));
}
}