79426327

Date: 2025-02-10 07:19:07
Score: 0.5
Natty:
Report link

You can create a file named Constants.php in root directory /app/Constants/Constants.php

Edit composer.json:

....
    "autoload": {
....
        "files": [
            "app/Constants/Constants.php"
        ]
    },
....

enter image description here

Insert this data into Constants.php

define('HTTP_STATUS', 'httpStatus');
define('HTTP_MESSAGE', 'message');
define('HTTP_SUCCESS', 'Success');
define('HTTP_STATUS_OK', '200');
define('HTTP_STATUS_NOT_FOUND', '404');
define('HTTP_STATUS_BAD_REQUEST', '400');
define('HTTP_STATUS_SERVER_ERROR', '500');

Note : run command :

composer update

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Amol