From 5cc4c00fbc627b0cb8b7841abd96a192d7930def Mon Sep 17 00:00:00 2001 From: Guilherme Pressutto Date: Tue, 16 Jul 2019 12:15:27 -0300 Subject: [PATCH] Using environment variable to set redis prefix 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 7f5150aecf7..921769ca1c9 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' => [