protected function makeAbsolute($url)
    {
        $parsedUrl = parse_url($url);

        $scheme = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] : 'http';
        $host = isset($parsedUrl['host']) ? $parsedUrl['host'] : 'localhost';
        $path = isset($parsedUrl['path']) ? $parsedUrl['path'] : '/';
        $query = isset($parsedUrl['query']) ? '?' . $parsedUrl['query'] : '';

        return $scheme . '://' . $host . '/' . ltrim($path, '/') . $query;
    }
protected function makeAbsolute($url)
    {
        $parsedUrl = parse_url($url);

        $scheme = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] : 'http';
        $host = isset($parsedUrl['host']) ? $parsedUrl['host'] : 'localhost';
        $path = isset($parsedUrl['path']) ? $parsedUrl['path'] : '/';
        $query = isset($parsedUrl['query']) ? '?' . $parsedUrl['query'] : '';

        return $scheme . '://' . $host . '/' . ltrim($path, '/') . $query;
    }
protected function makeAbsolute ( $ url ) { $ parsedUrl = parse_url ( $ url ) ; $ scheme = isset ( $ parsedUrl [ 'scheme' ] ) ? $ parsedUrl [ 'scheme' ] : 'http' ; $ host = isset ( $ parsedUrl [ 'host' ] ) ? $ parsedUrl [ 'host' ] : 'localhost' ; $ path = isset ( $ parsedUrl [ 'path' ] ) ? $ parsedUrl [ 'path' ] : '/' ; $ query = isset ( $ parsedUrl [ 'query' ] ) ? '?' . $ parsedUrl [ 'query' ] : '' ; return $ scheme . '://' . $ host . '/' . ltrim ( $ path , '/' ) . $ query ; }
Make URL absolute, so that the core fake frontend request bootstrap
correctly configures the environment for trusted host pattern.

@param string $url
@return string
Make URL absolute so that the core fake frontend request bootstrap correctly configures the environment for trusted host pattern .