【laravel5.4】安装指定版本的predis 和 处理laravel5.*安装使用Redis以及解决Class 'PredisClient' not found和Fatal error: Non-static method Redis::set() cannot be called statically错误

(predis下载地址:https://packagist.org/packages/predis/predis)

1、cmoposer 命令行: php composer require predis/predis:1.0.4

2、若服务器已安装了 phpredis扩展,需要进行更名处理:

3、出现:

Class 'PredisClient' not found

因为 你没有装predis 类库。

原文地址:https://www.cnblogs.com/xuzhengzong/p/8894131.html