Redis扩展冲突导致:Fatal error: Non-static method Redis::keys() cannot be called statically
如果你是通过 PECL 安装 Redis PHP 扩展,则需要重命名 config/app.php 文件里的 Redis 别名。
方法1、在每个使用use Redis;
的文件中,我们改为use Illuminate\Support\Facades\Redis;
即可
方法2、在config/app.php
中的aliases
修改Redis
修改为Rediss
这种别名,然后use Rediss;
即可