Skip to content

Commit a33c66c

Browse files
committed
changed redis support to load config from env
1 parent e78d1af commit a33c66c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ MAIL_PORT=2525
1717
MAIL_USERNAME=null
1818
MAIL_PASSWORD=null
1919
MAIL_ENCRYPTION=null
20+
21+
REDIS_HOST=localhost
22+
REDiS_KEY=
23+
REDIS_PORT=6379

config/database.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@
116116
'cluster' => false,
117117

118118
'default' => [
119-
'host' => '127.0.0.1',
120-
'port' => 6379,
119+
'host' => env('REDIS_HOST', 'localhost'),
120+
'password' => env('REDIS_KEY', ''),
121+
'port' => env('REDIS_PORT', 6379),
121122
'database' => 0,
122123
],
123124

0 commit comments

Comments
 (0)