Create a new redirect response to the previous location.

@param  int    $status
@param  array  $headers
@param  mixed  $fallback
@return \Illuminate\Http\RedirectResponse
970643
public function back($status = 302, $headers = [], $fallback = false)
    {
        return $this->createRedirect($this->generator->previous($fallback), $status, $headers);
    }
206656
public function redirectToAction($action, $parameters = array(), $status = 302, $headers = array())
	{
		return $this->redirector->action($action, $parameters, $status, $headers);
	}
1033078
public function createResponse($statusCode, array $headers = [], array $options = [])
    {
        $body = JsonRpc\json_encode($options);

        return new Response($statusCode, $headers, $body === false ? null : $body);
    }
154856
protected function instance(string $body, int $status = 200, array $headers = []) : Response
    {
        $response = new Response('php://memory', $status, $headers);
        $response->getBody()->write($body);

        return $response;
    }
607933
public function createRedirectResponse(Request $request, $path, $status = 302)
    {
        return new RedirectResponse($this->httpUtils->generateUri($request, $path), $status);
    }
506734
public function redirect($url, $status = 302)
    {
        $this->setStatus($status);
        $this->headers->set('Location', $url);
    }
744927
protected static function createRedirectResponse($url, $code, $headers)
    {
        $r = new RedirectResponse($url, $code, $headers);
        $r->setRequest(Request::getInstance());

        return $r;
    }
127709
public function respond($statusCode = 200, $headers = [], $options = 0)
    {
        $response = new JsonResponse();

        $response->setData($this->createData()->toArray());

        if (is_int($statusCode)) {
            $statusCode = function (JsonResponse $response) use ($statusCode) {
                return $response->setStatusCode($statusCode);
            };
        }

        if (is_array($headers)) {
            $headers = function (JsonResponse $response) use ($headers) {
                return $response->withHeaders($headers);
            };
        }

        if (is_int($options)) {
            $options = function (JsonResponse $response) use ($options) {
                $response->setEncodingOptions($options);

                return $response;
            };
        }

        if (is_callable($options)) {
            $options($response);
        }

        if (is_callable($statusCode)) {
            $statusCode($response);
        }

        if (is_callable($headers)) {
            $headers($response);
        }

        return $response;
    }
347144
public function redirectToRoute($route, $parameters = array(), $status = 302, $headers = array())
	{
		return $this->redirector->route($route, $parameters, $status, $headers);
	}
870270
public function redirect($url, $status = 302)
    {
        if ($status != 302) {
            $this->setStatus($status);
        }
        $this->setHeader('Location', $url);
        $this->sendHeader();
    }
149325
protected function getHttpResponse($status, array $headers = [])
    {
        if (array_key_exists($status, self::HTTP_RESPONSES)) {
            $response = self::HTTP_RESPONSES[$status];
        } else {
            $response = self::HTTP_RESPONSES[self::HTTP_NOT_IMPLEMENTED];
        }

        $handshake = [
            sprintf(self::RESPONSE_LINE_FORMAT, $status, $response),
        ];

        foreach ($headers as $name => $value) {
            $handshake[] = sprintf(self::HEADER_LINE_FORMAT, $name, $value);
        }

        return implode($handshake, "\r\n") . "\r\n\r\n";
    }
1180450
protected function redirectToRoute(string $route, $parameters = [], int $status = 302): RedirectResponse
    {
        return $this->redirect($this->generateUrl($route, $parameters), $status);
    }
1063089
public function redirectGuest($path, $status = 302, $headers = array(), $secure = null)
	{
		return $this->redirector->guest($path, $status, $headers, $secure);
	}
273270
public function redirectToRoute($route, $parameters = [], $status = 302, $headers = [])
    {
        respondWith(response()->redirectToRoute($route, $parameters, $status, $headers));
    }
1309078
public function response($version, $status, $reason, $headers = array(), $body = '')
    {
        return new Response($status, $headers, $this->body($body), $version, $reason);
    }
414441
protected function createRedirect($path, $status, $headers)
    {
        $redirect = new RedirectResponse($path, $status, $headers);

        $redirect->setRequest($this->app->make('request'));

        return $redirect;
    }
340609
public function refresh($status = 302, $headers = [])
    {
        return $this->to($this->generator->getRequest()->path(), $status, $headers);
    }