src/Router.php
public function redirect($route, $permanent = false)
    {
        $route = $this->validate($route);
        return $this->redirectPath($this->getPath($route), $route->getQuery(), $route->getFragment(), $permanent);
    }
public function redirect($route, $permanent = false)
    {
        $route = $this->validate($route);
        return $this->redirectPath($this->getPath($route), $route->getQuery(), $route->getFragment(), $permanent);
    }
public function redirect ( $ route , $ permanent = false ) { $ route = $ this -> validate ( $ route ) ; return $ this -> redirectPath ( $ this -> getPath ( $ route ) , $ route -> getQuery ( ) , $ route -> getFragment ( ) , $ permanent ) ; }
Create a route redirect.

@param string|array|Route|HasRoute $route A route.
@param bool $permanent Whether redirect is permanent.
@return ResponseInterface A redirect response.
Create a route redirect .