src/Traits/Redis/RedisTrait.php
public function getDefaultRedis(): ?Connection
    {
        // From Laravel 5.4, the redis facade now returns the
        // Redis Manager, which is why we must use it to obtain
        // the default Redis connection. Thus, the
        // "Illuminate\Contracts\Redis\Database" interface is no
        // longer used.
        $factory = Redis::getFacadeRoot();
        if (isset($factory)) {
            return $factory->connection();
        }
        return $factory;
    }
public function getDefaultRedis(): ?Connection
    {
        // From Laravel 5.4, the redis facade now returns the
        // Redis Manager, which is why we must use it to obtain
        // the default Redis connection. Thus, the
        // "Illuminate\Contracts\Redis\Database" interface is no
        // longer used.
        $factory = Redis::getFacadeRoot();
        if (isset($factory)) {
            return $factory->connection();
        }
        return $factory;
    }
public function getDefaultRedis ( ) : ? Connection { // From Laravel 5.4, the redis facade now returns the // Redis Manager, which is why we must use it to obtain // the default Redis connection. Thus, the // "Illuminate\Contracts\Redis\Database" interface is no // longer used. $ factory = Redis :: getFacadeRoot ( ) ; if ( isset ( $ factory ) ) { return $ factory -> connection ( ) ; } return $ factory ; }
Get a default redis value, if any is available

@return Connection|null A default redis value or Null if no default value is available
Get a default redis value if any is available