Top Menu

如何给laravel配置redis为predis

修改env

增加REDIS_CLIENT字段值为predis,修改REDIS_HOST为redis服务器ip

安装predis

cd到laravel根目录运行

在controller中增加测试代码

将controller加入routes

访问/predis

返回baz

成功

 

There are no comments yet

  • Hello, guest

Powered by WordPress. Designed by WooThemes