public static function to(?string $path = '/', ?int $code = null)
  {
    $redirect = new Redirect;
    $redirect->url = $path;

    if ($code !== null) {
      $redirect->code = $code;
      return $redirect->send();
    }

    return $redirect;
  }
public static function to(?string $path = '/', ?int $code = null)
  {
    $redirect = new Redirect;
    $redirect->url = $path;

    if ($code !== null) {
      $redirect->code = $code;
      return $redirect->send();
    }

    return $redirect;
  }
public static function to ( ? string $ path = '/' , ? int $ code = null ) { $ redirect = new Redirect ; $ redirect -> url = $ path ; if ( $ code !== null ) { $ redirect -> code = $ code ; return $ redirect -> send ( ) ; } return $ redirect ; }
Redirect to path

@param string $path
@param integer $code
@return Redirect
Redirect to path