diff --git a/src/Helpers/ApiResponse.php b/src/Helpers/ApiResponse.php index 932dfbe..d892611 100644 --- a/src/Helpers/ApiResponse.php +++ b/src/Helpers/ApiResponse.php @@ -105,6 +105,7 @@ public static function message(string $message): static */ public static function response(int $statusCode = 200): \Illuminate\Http\JsonResponse { + if ($statusCode === 0) $statusCode = 500; $message = null; if (self::$message) $message = self::$message; else $message = self::$code ? __(self::$codePrefix .'.' . self::$code) : null;