1. Go to this page and download the library: Download hxm/enum library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hxm / enum example snippets
namespace App\Enums;
use HXM\Enum\Abstracts\EnumBase;
class ExampleEnums extends EnumBase
{
const E1 = 1;
const E2 = 2;
protected static $descriptions = [
1 => 'description for E1'
];
}