1. Laravel-China 镜像
composer config -g repo.packagist composer https://packagist.laravel-china.org
2. 国内镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
3. 原始(默认)镜像
composer config -g repo.packagist composer https://repo.packagist.org
4. 阿里云镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
- 不加-g表示当前项目镜像源(如下面是设置的当前项目Laravel-China 镜像)
#当前项目下composer.json 文件
{
"name": "root/www"