public function domain($maxLevels = 0)
    {
        $parts = explode('.', $this->uri()->getHost());

        return implode('.', array_slice($parts, -1 * $maxLevels));
    }
public function domain($maxLevels = 0)
    {
        $parts = explode('.', $this->uri()->getHost());

        return implode('.', array_slice($parts, -1 * $maxLevels));
    }
public function domain ( $ maxLevels = 0 ) { $ parts = explode ( '.' , $ this -> uri ( ) -> getHost ( ) ) ; return implode ( '.' , array_slice ( $ parts , - 1 * $ maxLevels ) ) ; }
Retrieve the current domain

@param int $maxLevels Trim the domain to max levels

@return string
Retrieve the current domain