public function url($withParams = true)
    {
        if ($withParams) {
            return (string)$this->uri;
        } else {
            return $this->root() . $this->uri->path;
        }
    }
public function url($withParams = true)
    {
        if ($withParams) {
            return (string)$this->uri;
        } else {
            return $this->root() . $this->uri->path;
        }
    }
public function url ( $ withParams = true ) { if ( $ withParams ) { return ( string ) $ this -> uri ; } else { return $ this -> root ( ) . $ this -> uri -> path ; } }
Returns the url of the request.

@param bool $withParams Returns with query params.
@return string
Returns the url of the request .