Browse Source

Using environment variable to set redis prefix (#5062)

It was the only redis setting that wasn't overridable by an environment variable. It can help if you have multiple instances using the same `APP_NAME`, e.g. a staging instance
Guilherme Pressutto 4 years ago
parent
commit
ddbbd0e67b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      config/database.php

+ 1 - 1
config/database.php

@@ -123,7 +123,7 @@ return [
 
         'options' => [
             'cluster' => env('REDIS_CLUSTER', 'predis'),
-            'prefix' => Str::slug(env('APP_NAME', 'laravel'), '_').'_database_',
+            'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
         ],
 
         'default' => [