src/SpamBlocker.php
public function isBlocked($host)
    {
        $host = parse_url($host, PHP_URL_HOST);
        $host = utf8_encode(trim($host));

        if (empty($host)) return false;

        $fullDomain = $this->getFullDomain($host);
        $rootDomain = $this->getRootDomain($fullDomain);

        return $this->spammers()
            ->whereHostIn([$fullDomain, $rootDomain])
            ->whereBlocked()
            ->count() > 0;
    }
public function isBlocked($host)
    {
        $host = parse_url($host, PHP_URL_HOST);
        $host = utf8_encode(trim($host));

        if (empty($host)) return false;

        $fullDomain = $this->getFullDomain($host);
        $rootDomain = $this->getRootDomain($fullDomain);

        return $this->spammers()
            ->whereHostIn([$fullDomain, $rootDomain])
            ->whereBlocked()
            ->count() > 0;
    }
public function isBlocked ( $ host ) { $ host = parse_url ( $ host , PHP_URL_HOST ) ; $ host = utf8_encode ( trim ( $ host ) ) ; if ( empty ( $ host ) ) return false ; $ fullDomain = $ this -> getFullDomain ( $ host ) ; $ rootDomain = $ this -> getRootDomain ( $ fullDomain ) ; return $ this -> spammers ( ) -> whereHostIn ( [ $ fullDomain , $ rootDomain ] ) -> whereBlocked ( ) -> count ( ) > 0 ; }
Check if the given host is blocked.

@param  string  $host

@return bool
Check if the given host is blocked .