public static function use($connection)
    {
        if (! is_null($config = config("database.redis.clusters.{$connection}.0"))) {
            config(["database.redis.{$connection}" => $config]);
        } elseif (is_null($config) && is_null($config = config("database.redis.{$connection}"))) {
            throw new Exception("Redis connection [{$connection}] has not been configured.");
        }

        config(['database.redis.horizon' => array_merge($config, [
            'options' => ['prefix' => config('horizon.prefix') ?: 'horizon:'],
        ])]);
    }
public static function use($connection)
    {
        if (! is_null($config = config("database.redis.clusters.{$connection}.0"))) {
            config(["database.redis.{$connection}" => $config]);
        } elseif (is_null($config) && is_null($config = config("database.redis.{$connection}"))) {
            throw new Exception("Redis connection [{$connection}] has not been configured.");
        }

        config(['database.redis.horizon' => array_merge($config, [
            'options' => ['prefix' => config('horizon.prefix') ?: 'horizon:'],
        ])]);
    }
public static function use ( $ connection ) { if ( ! is_null ( $ config = config ( "database.redis.clusters.{$connection}.0" ) ) ) { config ( [ "database.redis.{$connection}" => $ config ] ) ; } elseif ( is_null ( $ config ) && is_null ( $ config = config ( "database.redis.{$connection}" ) ) ) { throw new Exception ( "Redis connection [{$connection}] has not been configured." ) ; } config ( [ 'database.redis.horizon' => array_merge ( $ config , [ 'options' => [ 'prefix' => config ( 'horizon.prefix' ) ? : 'horizon:' ] , ] ) ] ) ; }
Configure the Redis databases that will store Horizon data.

@param  string  $connection
@return void
@throws Exception
Configure the Redis databases that will store Horizon data .