Browse Source

changed redis support to load config from env

Cory Fowler 8 years ago
parent
commit
a33c66cf47
2 changed files with 7 additions and 2 deletions
  1. 4 0
      .env.example
  2. 3 2
      config/database.php

+ 4 - 0
.env.example

@@ -17,3 +17,7 @@ MAIL_PORT=2525
 MAIL_USERNAME=null
 MAIL_PASSWORD=null
 MAIL_ENCRYPTION=null
+
+REDIS_HOST=localhost
+REDiS_KEY=
+REDIS_PORT=6379

+ 3 - 2
config/database.php

@@ -116,8 +116,9 @@ return [
         'cluster' => false,
 
         'default' => [
-            'host'     => '127.0.0.1',
-            'port'     => 6379,
+            'host'     => env('REDIS_HOST', 'localhost'),
+            'password' => env('REDIS_KEY', ''),
+            'port'     => env('REDIS_PORT', 6379),
             'database' => 0,
         ],