src/Model/Domain.php
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();
    }
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();
    }
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 ( ) ; }
Get domain by the specifed hostname.
If `true` is passed, and the site is in domain mode, this will return current domain instead.

@param string|true|Domain $domain
@return Domain
Get domain by the specifed hostname . If true is passed and the site is in domain mode this will return current domain instead .