From c8bc79e94ee7f4a992d70faa5ec140a9059e603f Mon Sep 17 00:00:00 2001 From: Jordan Hall Date: Thu, 4 Apr 2019 15:11:18 +0100 Subject: [PATCH 1/2] Prefix redis database connection by default to mitigate multiple sites on the same server potentially sharing the same queued jobs --- config/database.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/database.php b/config/database.php index 49ec59af2..7560c66b5 100644 --- a/config/database.php +++ b/config/database.php @@ -117,6 +117,7 @@ return [ 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'predis'), + 'prefix' => str_slug(env('APP_NAME', 'laravel'), '_').'_database', ], 'default' => [ From e68ff0c66aa1b3da2c9a14d86636d582fd73891e Mon Sep 17 00:00:00 2001 From: Jordan Hall Date: Thu, 4 Apr 2019 22:18:28 +0100 Subject: [PATCH 2/2] Use Str class instead of helper function --- config/database.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/database.php b/config/database.php index 7560c66b5..1f96d0ddd 100644 --- a/config/database.php +++ b/config/database.php @@ -1,5 +1,7 @@ [ 'cluster' => env('REDIS_CLUSTER', 'predis'), - 'prefix' => str_slug(env('APP_NAME', 'laravel'), '_').'_database', + 'prefix' => Str::slug(env('APP_NAME', 'laravel'), '_').'_database', ], 'default' => [