public function toRoute($name, array $params = [])
    {
        $url = $this->getUrl()->fromRoute($name, $params);

        return $this->toUrl($url);
    }
public function toRoute($name, array $params = [])
    {
        $url = $this->getUrl()->fromRoute($name, $params);

        return $this->toUrl($url);
    }
public function toRoute ( $ name , array $ params = [ ] ) { $ url = $ this -> getUrl ( ) -> fromRoute ( $ name , $ params ) ; return $ this -> toUrl ( $ url ) ; }
Generates redirection by given route.

@param string $name   The route name
@param array  $params Optional; The route parameters

@return \Es\Http\Psr\ResponseInterface The response
Generates redirection by given route .