Redirect to a route.

@param $route
@param array $parameters
@param int   $status
@param array $headers

@return mixed
497816
public function redirect($route, $parameters = array(), $status = 302, $headers = array())
    {
        return Redirect::route('admin.'.$route, $parameters, $status, $headers);
    }
1323918
public static function fromRoute(Route $route, array $params = []): self
    {
        $result = new self();
        $result->success = true;
        $result->route = $route;
        $result->matchedParams = $params;

        return $result;
    }
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);

	}
252682
protected function redirectTo($route, array $parameters = [])
    {
        $url = $this->url->toRoute($route, $parameters);

        return $this->makeRedirect($url);
    }
775258
public function redirect($location, $status = 302)
    {
        if (!$location) {
            return;
        }
        $this->status($status);
        $headers = $this->headers();
        $headers['Location'] = $location;
        return $this;
    }
702342
protected function formatDomain($route, &$parameters)
    {
        return $this->addPortToDomain(
            $this->getRouteScheme($route).$route->getDomain()
        );
    }
409121
public function redirect($url, $status = 301)
    {
        $status = (int) $status;

        if (!empty($url)) {

            header($this->get('protocol') . ' 301 Redirect');
            header('Status: ' . $status . ' Redirect');
            header('Location: ' . $url);
            exit(0);
        } else {
            throw new \Exception('Url is empty !');
        }
    }
1102046
protected function redirect($url, $statusCode = 302)
    {
        $response = new RedirectResponse($url, $statusCode);
        $this->getServiceLocator()->set('Response', $response);

        return $response;
    }
493136
public function redirect($route, $permanent = false, $exit = true)
    {
        $url = Url::compute($route);

        ($permanent === true) ? Header::sendMovedPermanently() : Header::sendFound();

        Header::toLocation($url, $exit);
    }
506734
public function redirect($url, $status = 302)
    {
        $this->setStatus($status);
        $this->headers->set('Location', $url);
    }
1008600
public function to($path, $status = 302, $headers = array(), $secure = null)
    {
        $path = $this->generator->to($path, array(), $secure);

        return $this->createRedirect($path, $status, $headers);
    }
1304944
public function to($path, $status = 302, $headers = [], $secure = null)
    {
        $path = $this->app->make('url')->to($path, [], $secure);

        return $this->createRedirect($path, $status, $headers);
    }
1199699
protected function redirectView($url, $statusCode = Response::HTTP_FOUND, array $headers = [])
    {
        return View::createRedirect($url, $statusCode, $headers);
    }
970643
public function back($status = 302, $headers = [], $fallback = false)
    {
        return $this->createRedirect($this->generator->previous($fallback), $status, $headers);
    }
870270
public function redirect($url, $status = 302)
    {
        if ($status != 302) {
            $this->setStatus($status);
        }
        $this->setHeader('Location', $url);
        $this->sendHeader();
    }
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;
    }
558635
public function withRedirect($url, $status = null)
        {
            $response = $this->withHeader('Location', (string)$url);
            if (is_null($status) && $this->getStatusCode() === 200) {
                $status = 302;
            }
            if (!is_null($status)) {
                return $response->withStatus($status);
            }
            return $response;
        }