protected function resolveConnection($name = null)
    {
        $name = $name ?: 'default';
        $options = Arr::get($this->config, 'options', [ ]);

        if (isset($this->config[$name])) {
            return $this->connector()->connect($this->config[$name], $options);
        }

        if (isset($this->config['clusters']['name'])) {
            throw new InvalidArgumentException(
                'Redis Sentinel connections do not support Redis Cluster.'
            );
        }

        throw new InvalidArgumentException(
            'The Redis Sentinel connection [' . $name . '] is not defined.'
        );
    }
protected function resolveConnection($name = null)
    {
        $name = $name ?: 'default';
        $options = Arr::get($this->config, 'options', [ ]);

        if (isset($this->config[$name])) {
            return $this->connector()->connect($this->config[$name], $options);
        }

        if (isset($this->config['clusters']['name'])) {
            throw new InvalidArgumentException(
                'Redis Sentinel connections do not support Redis Cluster.'
            );
        }

        throw new InvalidArgumentException(
            'The Redis Sentinel connection [' . $name . '] is not defined.'
        );
    }
protected function resolveConnection ( $ name = null ) { $ name = $ name ? : 'default' ; $ options = Arr :: get ( $ this -> config , 'options' , [ ] ) ; if ( isset ( $ this -> config [ $ name ] ) ) { return $ this -> connector ( ) -> connect ( $ this -> config [ $ name ] , $ options ) ; } if ( isset ( $ this -> config [ 'clusters' ] [ 'name' ] ) ) { throw new InvalidArgumentException ( 'Redis Sentinel connections do not support Redis Cluster.' ) ; } throw new InvalidArgumentException ( 'The Redis Sentinel connection [' . $ name . '] is not defined.' ) ; }
Get the Redis Connection instance represented by the specified name

@param string|null $name The name of the connection as defined in the
configuration

@return \Illuminate\Redis\Connections\PredisConnection The configured
Redis Connection instance

@throws InvalidArgumentException If attempting to initialize a Redis
Cluster connection
@throws InvalidArgumentException If the specified connection is not
defined in the configuration
Get the Redis Connection instance represented by the specified name