From 93f5d74e1b6126d0de4416c230cb35aaddbe51bc Mon Sep 17 00:00:00 2001 From: nthsky Date: Tue, 12 Jul 2022 02:08:25 +0800 Subject: [PATCH] when register, keep the original redis options, only overwrite prefix (#1161) * when register horizon, keep the original redis options, only overwrite prefix * delete space * Update Horizon.php Co-authored-by: Taylor Otwell --- src/Horizon.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Horizon.php b/src/Horizon.php index 7f5eb0e6..84f0f5d3 100644 --- a/src/Horizon.php +++ b/src/Horizon.php @@ -103,9 +103,9 @@ public static function use($connection) throw new Exception("Redis connection [{$connection}] has not been configured."); } - config(['database.redis.horizon' => array_merge($config, [ - 'options' => ['prefix' => config('horizon.prefix') ?: 'horizon:'], - ])]); + $config['options']['prefix'] = config('horizon.prefix') ?: 'horizon:'; + + config(['database.redis.horizon' => $config]); } /**