laravel5.4安装redis扩展包

时间:2022-09-24 00:21:31

编辑 laravel 根目录下的 composer.json 文件:

1、在 require 里添加 predis

"require": {
"php": ">=5.6.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"predis/predis": "~1.1@dev"
}

laravel5.4安装redis扩展包

2、添加国内镜像依赖,在composer.json的最后添加仓库地址

"repositories": [  
{"type": "composer", "url": "http://packagist.phpcomposer.com"},
{"packagist": false}
]

laravel5.4安装redis扩展包

执行命令下载:

composer update