标签:-o 依赖包 alt 保存 data- config rip class strip
composer require predis/predis
‘session‘ => [ ‘host‘ => env(‘REDIS_HOST‘, ‘127.0.0.1‘), ‘password‘ => env(‘REDIS_PASSWORD‘, null), ‘port‘ => env(‘REDIS_PORT‘, 6379), ‘database‘ => 10, ],
config/session.php
,修改driver配置项,将默认的file
改为redis
;connection
配置项填入第一步中配置的redis连接名session
SESSION_DRIVER=file 修改为 SESSION_DRIVER=redis
【转】laravel框架中 session保存到Redis中
标签:-o 依赖包 alt 保存 data- config rip class strip
原文地址:https://www.cnblogs.com/xuan52rock/p/12449271.html