src/UrlGenerator.php
public function getBaseUrl(): string
    {
        if (\is_null($this->baseUrl)) {
            $this->resolveBaseUrlFrom($this->request->root());
        }

        return $this->baseUrl;
    }
public function getBaseUrl(): string
    {
        if (\is_null($this->baseUrl)) {
            $this->resolveBaseUrlFrom($this->request->root());
        }

        return $this->baseUrl;
    }
Get base url.

@return string