public function redirectRoute(
        string $route,
        array $parameters = [],
        int $statusCode = StatusCode::FOUND,
        array $headers = []
    ): RedirectResponse {
        // Get the uri from the router using the route and parameters
        $uri = $this->router()->routeUrl($route, $parameters);

        return $this->redirect($uri, $statusCode, $headers);
    }
public function redirectRoute(
        string $route,
        array $parameters = [],
        int $statusCode = StatusCode::FOUND,
        array $headers = []
    ): RedirectResponse {
        // Get the uri from the router using the route and parameters
        $uri = $this->router()->routeUrl($route, $parameters);

        return $this->redirect($uri, $statusCode, $headers);
    }
public function redirectRoute ( string $ route , array $ parameters = [ ] , int $ statusCode = StatusCode :: FOUND , array $ headers = [ ] ) : RedirectResponse { // Get the uri from the router using the route and parameters $ uri = $ this -> router ( ) -> routeUrl ( $ route , $ parameters ) ; return $ this -> redirect ( $ uri , $ statusCode , $ headers ) ; }
Return a new redirect response from the application for a given route.

@param string $route      The route to match
@param array  $parameters [optional] Any parameters to set for dynamic
routes
@param int    $statusCode [optional] The response status code
@param array  $headers    [optional] An array of response headers

@throws \InvalidArgumentException
@throws \Valkyrja\Http\Exceptions\InvalidStatusCodeException

@return \Valkyrja\Http\RedirectResponse
Return a new redirect response from the application for a given route .