src/MessageHelper.php
protected function redirect(Response $response, int $code, string $url): Response
    {
        return $response->withStatus($code)->withHeader('Location', $url);
    }
protected function redirect(Response $response, int $code, string $url): Response
    {
        return $response->withStatus($code)->withHeader('Location', $url);
    }
Redirects the user to another URL.

@param \Psr\Http\Message\ResponseInterface $response  The HTTP response
@return \Psr\Http\Message\ResponseInterface  The new response