mac1qc/http-status-code

Helper to get HTTP status code by using common name

v1.0.2 2024-09-12 23:11 UTC

This package is auto-updated.

Last update: 2025-07-13 01:14:45 UTC


README

Helper to get HTTP status code by using common name, so it's easier to read while coding.

How to install?

In your project, run in your terminal

$ composer require mac1qc/http-status-code

How to use?

Instead of writting your Status code in number like:

if ($statusCode === 200) {
  return 'something';
}

Do something like:

if ($statusCode === StatusCode::OK->value) {
  return 'something';
}

Wanna show your appreciation?

If you find that library useful, you can buy me a coffee/beer