Add http status code enum

This commit is contained in:
Lance Pioch 2024-05-07 19:59:52 -04:00
parent 939b7354e4
commit d0d388534b

View File

@ -0,0 +1,31 @@
<?php
namespace App\Enums;
enum HttpStatusCode: int
{
// Client
case BadRequest = 400;
case Unauthorized = 401;
case Forbidden = 403;
case NotFound = 404;
case MethodNotAllowed = 405;
case NotAcceptable = 406;
case ProxyAuthenticationRequired = 407;
case RequestTimeout = 408;
case Conflict = 409;
case Gone = 410;
case LengthRequired = 411;
case PreconditionFailed = 412;
case PayloadTooLarge = 413;
case UriTooLong = 414;
case UnsupportedMediaType = 415;
// Server
case InternalServerError = 500;
case NotImplemented = 501;
case BadGateway = 502;
case ServiceUnavailable = 503;
case GatewayTimeout = 504;
case HTTPVersionNotSupported = 505;
}