Create a new redirect response to a named route.

@param  string  $route
@param  mixed   $parameters
@param  int     $status
@param  array   $headers
@return \Illuminate\Http\RedirectResponse
507343
public function route($route, $parameters = [], $status = 302, $headers = [])
    {
        return $this->to($this->generator->route($route, $parameters), $status, $headers);
    }
129154
protected function created(Response $response, $route, array $params = [])
    {
        return $this->redirect($response, $route, $params)->withStatus(201);
    }
1008600
public function to($path, $status = 302, $headers = array(), $secure = null)
    {
        $path = $this->generator->to($path, array(), $secure);

        return $this->createRedirect($path, $status, $headers);
    }
1063089
public function redirectGuest($path, $status = 302, $headers = array(), $secure = null)
	{
		return $this->redirector->guest($path, $status, $headers, $secure);
	}
617208
public static function add($route, $parameters)
    {
        self::$route = $route;
        array_shift($parameters);
        self::$parameters = $parameters;
    }
191708
protected function createRedirect($path, $status, $headers)
    {
        $response = new RedirectResponse($path, $status, $headers);

        // Session
        if (isset($this->session)) {
            $response->setSession($this->session);
        }

        // Request
        $response->setRequest($this->generator->getRequest());

        return $response;
    }
125680
public function redirectTo($path, $status = 302, $headers = [], $secure = null)
    {
        respondWith(response()->redirectTo($path, $status, $headers, $secure));
    }
920001
protected function redirect($url = null, $queryParams = [], $statusCode = 302) {

		if(is_null($url)) {
			return $this->route->redirect($queryParams, $statusCode);
		}

		if($queryParams) {
			$query = (strpos($url, '?') === false ? '?' : '&') . http_build_query($queryParams);
		}

		else {
			$query = '';
		}

		return new RedirectResponse($url . $query, $statusCode);

	}
89784
protected function redirect($location, $status = 302, $headers = array()) {
		// Check if a output action has be already performed
		$this->_checkIfPerformed();

		// Create a redirect
		$redirectResponse = \Symfony\Component\HttpFoundation\RedirectResponse::create($location, $status, $headers);

		// Add request informationen
		$redirectResponse->prepare($this->application->requestStack->getCurrentRequest());

		// Replace response object
		$this->application->response = $redirectResponse;

		// Don't use a template
		$this->useTemplate(false, $status);
	}
62652
public function redirectToIntended($default = '/', $status = 302, $headers = array(), $secure = null)
	{
		return $this->redirector->intended($default, $status, $headers, $secure);
	}
1033078
public function createResponse($statusCode, array $headers = [], array $options = [])
    {
        $body = JsonRpc\json_encode($options);

        return new Response($statusCode, $headers, $body === false ? null : $body);
    }
340609
public function refresh($status = 302, $headers = [])
    {
        return $this->to($this->generator->getRequest()->path(), $status, $headers);
    }
607933
public function createRedirectResponse(Request $request, $path, $status = 302)
    {
        return new RedirectResponse($this->httpUtils->generateUri($request, $path), $status);
    }
801477
public function redirectRoute($route, $parameters = [], $absolute = true)
    {
        $this->url = route($route, $parameters, $absolute);

        return $this;
    }
856174
protected function _redirect($redirectUrl, $statusCode = 301)
    {
        header('HTTP/1.1 ' . $statusCode);
        header('Location: ' . Router::url($redirectUrl, true));
        exit(0);
    }
1186269
public function redirect($path, $status = 301)
    {
        if (!$this->asWidget) {
            /** @var ResponseInterface $response */
            $response = (new ResponseInjector)->build();
            if (!$response) {
                throw new Exception('Component `response` not configured');
            }

            $response = $response->withStatus($status);
            $response = $response->getHeaderLine('Location: '.$path);

            return $response;
        }

        return false;
    }
1157652
protected function createRedirect( $path, $status, $headers )
	{
		$redirect = new RedirectResponse( $path, $status, $headers );

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

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

		return $redirect;
	}