public static function getByDomain($domain)
    {
        // Map true -> actual domain
        if ($domain === true) {
            $state = FluentState::singleton();
            $domain = $state->getIsDomainMode() ? $state->getDomain() : null;
        }

        // No domain found
        if (!$domain) {
            return null;
        }

        if ($domain instanceof Domain) {
            return $domain;
        }

        // Get filtered domain
        return static::getCached()
            ->filter('Domain', $domain)
            ->first();
    }