Check option before connecting to Redis
This commit is contained in:
parent
d27dc54377
commit
40ea4c0911
@ -47,7 +47,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
}
|
||||
|
||||
try {
|
||||
if (Redis::ping()) {
|
||||
if (option('enable_redis') && Redis::ping()) {
|
||||
config(['cache.default' => 'redis']);
|
||||
config(['session.driver' => 'redis']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user