编辑 laravel 根目录下的 composer.json 文件:
1、在 require 里添加 predis
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"predis/predis": "~1.1@dev"
}
2、添加国内镜像依赖,在composer.json的最后添加仓库地址
"repositories": [
{"type": "composer", "url": "http://packagist.phpcomposer.com"},
{"packagist": false}
]
执行命令下载:
composer update