success() success(mixed $data = [], string $msg = 'ok') : static 业务成功 Parameters mixed $data string $msg Returns static —
fail() fail(string $msg = 'fail', mixed $data = [], int $code = 1) : static 业务失败(仍然是 200) Parameters string $msg mixed $data int $code Returns static —
error() error(string $msg, int $httpStatus = self::HTTP_INTERNAL_SERVER_ERROR, int $code = 1) : static HTTP 异常(权限 / 系统) Parameters string $msg int $httpStatus int $code Returns static —
unauthorized() unauthorized(string $msg = 'Unauthenticated') : static 未认证(JWT 失效 / 未登录) Parameters string $msg Returns static —
csrfExpired() csrfExpired(string $msg = 'CSRF token mismatch') : static CSRF 校验失败 Parameters string $msg Returns static —