public function redirect($url, $statusCode = 302)
    {
        if (strpos($url, '/') === 0 && strpos($url, '//') !== 0) {
            $url = request()->root() . $url;
        }

        $this->status($statusCode);
        $this->headers->set('Location', $url);
    }
public function redirect($url, $statusCode = 302)
    {
        if (strpos($url, '/') === 0 && strpos($url, '//') !== 0) {
            $url = request()->root() . $url;
        }

        $this->status($statusCode);
        $this->headers->set('Location', $url);
    }
public function redirect ( $ url , $ statusCode = 302 ) { if ( strpos ( $ url , '/' ) === 0 && strpos ( $ url , '//' ) !== 0 ) { $ url = request ( ) -> root ( ) . $ url ; } $ this -> status ( $ statusCode ) ; $ this -> headers -> set ( 'Location' , $ url ) ; }
Redirects to the specified url.

@param string $url
@param int    $statusCode
@since 0.2.0
Redirects to the specified url .