1. Go to this page and download the library: Download jiannei/laravel-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/ */
jiannei / laravel-enum example snippets
namespace Jiannei\Enum\Laravel\Tests\Enums;
use Jiannei\Enum\Laravel\Support\Traits\EnumEnhance;
enum UserType: int
{
use EnumEnhance;
case ADMINISTRATOR = 0;
case MODERATOR = 1;
case SUBSCRIBER = 2;
}