protected function getDatabaseConnectionConfig($connection)
    {
        $connections = $this->proxy->get('database.connections');
        if (!isset($connections[$connection])) {
            throw new Exception('Unknown database connection: ' . $connection);
        }
        $config = $connections[$connection];
        if (!in_array($config['driver'], ['mysql', 'pgsql'])) {
            throw new Exception('Currently only MySQL and PostgreSQL databases are supported using the laravel config');
        }
        return $config;
    }