src/Controllers/AbstractController.php
protected function redirect($url, $code = 302)
    {
        $this->response->setStatusCode($code);
        $this->response->headers->set('Location', $url);

        return $this->response;
    }
protected function redirect($url, $code = 302)
    {
        $this->response->setStatusCode($code);
        $this->response->headers->set('Location', $url);

        return $this->response;
    }
protected function redirect ( $ url , $ code = 302 ) { $ this -> response -> setStatusCode ( $ code ) ; $ this -> response -> headers -> set ( 'Location' , $ url ) ; return $ this -> response ; }
Get a redirection response.

@param string $url
@param int    $code

@return \Symfony\Component\HttpFoundation\Response
Get a redirection response .