public function to($url)
    {
        if ($url == '/' && $this->getRoot() == $url) {
            return $url;
        }

        return $this->isValidUrl($url) ? $url : $this->generateUrl($url);
    }
public function to($url)
    {
        if ($url == '/' && $this->getRoot() == $url) {
            return $url;
        }

        return $this->isValidUrl($url) ? $url : $this->generateUrl($url);
    }
public function to ( $ url ) { if ( $ url == '/' && $ this -> getRoot ( ) == $ url ) { return $ url ; } return $ this -> isValidUrl ( $ url ) ? $ url : $ this -> generateUrl ( $ url ) ; }
Generates a URL useful for anchor tags.

@param string $url - URL to generate from

@return string
Generates a URL useful for anchor tags .