運(yùn)行命令行
$ composer config repo.packagist composer https://packagist.laravel-china.org
報(bào)下面錯(cuò)誤:
[RuntimeException]
File "./composer.json" cannot be found in the current directory
解決:
加上 -g [ --global ] 就可以了,用全局配置就不用去找 composer.json 文件了