src/Helpers/Request/UrlHelper.php
public function home($scheme = false)
    {
        $url = $this->app->getHomeUrl();

        if ($scheme !== false) {
            $url = $this->getUrlManager()->getHostInfo() . $url;
            $url = $this->ensureScheme($url, $scheme);
        }
        if (strpos($url, '/') !== 0) {
            $url = '/' . $url;
        }

        return $url;
    }
public function home($scheme = false)
    {
        $url = $this->app->getHomeUrl();

        if ($scheme !== false) {
            $url = $this->getUrlManager()->getHostInfo() . $url;
            $url = $this->ensureScheme($url, $scheme);
        }
        if (strpos($url, '/') !== 0) {
            $url = '/' . $url;
        }

        return $url;
    }
Returns the home URL.

@param bool|string $scheme the URI scheme to use for the returned URL:

- `false` (default): returning a relative URL.
- `true`: returning an absolute base URL whose scheme is the same as that in [[\yii\web\UrlManager::$hostInfo]].
- string: returning an absolute URL with the specified scheme (either `http`, `https` or empty string
for protocol-relative URL).

@return string home URL
@see \Reaction\Helpers\Url::home()