src/Valkyrja/Http/NativeResponseBuilder.php
public function route(
        string $route,
        array $parameters = [],
        int $statusCode = StatusCode::FOUND,
        array $headers = []
    ): RedirectResponse {
        return $this->app->redirectRoute(
            $route,
            $parameters,
            $statusCode,
            $headers
        );
    }
public function route(
        string $route,
        array $parameters = [],
        int $statusCode = StatusCode::FOUND,
        array $headers = []
    ): RedirectResponse {
        return $this->app->redirectRoute(
            $route,
            $parameters,
            $statusCode,
            $headers
        );
    }
Redirect to a named route response builder.

@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

@return \Valkyrja\Http\RedirectResponse