Laravel框架: Call to a member function connect() on null 异常报错处理
Date: 2024.03.01 21:03:11 author: lijianzhan
原文链接: https://learnku.com/laravel/t/63721
问题:
local.ERROR: Call to a member function connect() on null {"exception":"[object] (Error(code: 0): Call to a member function connect() on null at /home/vagrant/Code/l8api/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php:110)
[stacktrace]
#0 /home/vagrant/Code/l8api/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php(91): Illuminate\\Redis\\RedisManager->resolve()
#1 /home/vagrant/Code/l8api/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php(277): Illuminate\\Redis\\RedisManager->connection()
"}
解决方案:
更改.env配置文件,redis相关配置