src/Leevel/Router/Redirect.php
protected function createRedirectResponse(string $url, int $status = 302, array $headers = []): RedirectResponse
    {
        $redirect = new RedirectResponse($url, $status, $headers);

        if (isset($this->session)) {
            $redirect->setSession($this->session);
        }

        $redirect->setRequest($this->url->getRequest());

        return $redirect;
    }
protected function createRedirectResponse(string $url, int $status = 302, array $headers = []): RedirectResponse
    {
        $redirect = new RedirectResponse($url, $status, $headers);

        if (isset($this->session)) {
            $redirect->setSession($this->session);
        }

        $redirect->setRequest($this->url->getRequest());

        return $redirect;
    }
返回一个跳转响应.

@param string $url
@param int    $status
@param array  $headers

@return \Leevel\Http\RedirectResponse