public function registerViaConnectionMethod()
    {
        foreach ($this->classes as $driver => $class) {
            Connection::resolverFor($driver, function ($connection, $database, $prefix, $config) use ($class) {
                return new $class($connection, $database, $prefix, $config);
            });
        }
    }