public function redirectToRoute($routeName, array $parameters = [])
    {
        $url = $this->router->getRouteUrlByName($routeName, $parameters);
        if (!$url) {
            throw new \Parable\Framework\Exception("Can't redirect to route, '{$routeName}' does not exist.");
        }
        $this->response->redirect($this->url->getUrl($url));
    }
public function redirectToRoute($routeName, array $parameters = [])
    {
        $url = $this->router->getRouteUrlByName($routeName, $parameters);
        if (!$url) {
            throw new \Parable\Framework\Exception("Can't redirect to route, '{$routeName}' does not exist.");
        }
        $this->response->redirect($this->url->getUrl($url));
    }
public function redirectToRoute ( $ routeName , array $ parameters = [ ] ) { $ url = $ this -> router -> getRouteUrlByName ( $ routeName , $ parameters ) ; if ( ! $ url ) { throw new \ Parable \ Framework \ Exception ( "Can't redirect to route, '{$routeName}' does not exist." ) ; } $ this -> response -> redirect ( $ this -> url -> getUrl ( $ url ) ) ; }
Redirect directly by using a route name.

@param string $routeName
@param array  $parameters

@throws \Parable\Framework\Exception
Redirect directly by using a route name .