lib/Controller.php
protected function redirect($url, $status = 302)
    {
        return $this->getResponse()
            ->withStatus($status)
            ->withHeader('Location', (string)$url);
    }
protected function redirect($url, $status = 302)
    {
        return $this->getResponse()
            ->withStatus($status)
            ->withHeader('Location', (string)$url);
    }
protected function redirect ( $ url , $ status = 302 ) { return $ this -> getResponse ( ) -> withStatus ( $ status ) -> withHeader ( 'Location' , ( string ) $ url ) ; }
Redirect to URL with optional status

@param string $url    The redirect destination.
@param int    $status The redirect HTTP status code (between 100 and 599).

@return Response
Redirect to URL with optional status