From ddbbd0e67b804c379f212233e3b1c91a7b649522 Mon Sep 17 00:00:00 2001 From: Guilherme Pressutto Date: Tue, 16 Jul 2019 16:38:28 -0300 Subject: [PATCH] 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 --- config/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.php b/config/database.php index 7f5150ae..921769ca 100644 --- a/config/database.php +++ b/config/database.php @@ -123,7 +123,7 @@ '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' => [