Updated config to read redis from config.redis

This commit is contained in:
Alejandro Celaya
2020-01-05 16:45:14 +01:00
parent abe54c67d8
commit 4fadd523f1
4 changed files with 23 additions and 12 deletions

View File

@@ -62,6 +62,12 @@ $helper = new class {
$webhooks = env('VISITS_WEBHOOKS');
return $webhooks === null ? [] : explode(',', $webhooks);
}
public function getRedisConfig(): ?array
{
$redisServers = env('REDIS_SERVERS');
return $redisServers === null ? null : ['servers' => $redisServers];
}
};
return [
@@ -112,8 +118,8 @@ return [
],
],
'redis' => [
'servers' => env('REDIS_SERVERS'),
'cache' => [
'redis' => $helper->getRedisConfig(),
],
'router' => [