src/UrlGenerator.php
public function domain(bool $forceBase = false): ?string
    {
        $pattern = $this->domain;
        $baseUrl = $this->getBaseUrl();

        if (\is_null($pattern) && $forceBase === true) {
            $pattern = $baseUrl;
        } elseif (Str::contains($pattern, '{{domain}}')) {
            $pattern = \str_replace('{{domain}}', $baseUrl, $pattern);
        }

        return $pattern;
    }
public function domain(bool $forceBase = false): ?string
    {
        $pattern = $this->domain;
        $baseUrl = $this->getBaseUrl();

        if (\is_null($pattern) && $forceBase === true) {
            $pattern = $baseUrl;
        } elseif (Str::contains($pattern, '{{domain}}')) {
            $pattern = \str_replace('{{domain}}', $baseUrl, $pattern);
        }

        return $pattern;
    }
Get route domain.

@param  bool  $forceBase

@return string|null