public function parseConfiguration($config)
    {
        if (is_string($config)) {
            $config = ['url' => $config];
        }

        $url = $config['url'] ?? null;

        $config = Arr::except($config, 'url');

        if (! $url) {
            return $config;
        }

        $parsedUrl = $this->parseUrl($url);

        return array_merge(
            $config,
            $this->getPrimaryOptions($parsedUrl),
            $this->getQueryOptions($parsedUrl)
        );
    }
public function parseConfiguration($config)
    {
        if (is_string($config)) {
            $config = ['url' => $config];
        }

        $url = $config['url'] ?? null;

        $config = Arr::except($config, 'url');

        if (! $url) {
            return $config;
        }

        $parsedUrl = $this->parseUrl($url);

        return array_merge(
            $config,
            $this->getPrimaryOptions($parsedUrl),
            $this->getQueryOptions($parsedUrl)
        );
    }
public function parseConfiguration ( $ config ) { if ( is_string ( $ config ) ) { $ config = [ 'url' => $ config ] ; } $ url = $ config [ 'url' ] ?? null ; $ config = Arr :: except ( $ config , 'url' ) ; if ( ! $ url ) { return $ config ; } $ parsedUrl = $ this -> parseUrl ( $ url ) ; return array_merge ( $ config , $ this -> getPrimaryOptions ( $ parsedUrl ) , $ this -> getQueryOptions ( $ parsedUrl ) ) ; }
Parse the database configuration, hydrating options using a database configuration URL if possible.

@param  array|string  $config
@return array
Parse the database configuration hydrating options using a database configuration URL if possible .