1. Go to this page and download the library: Download lazerg/laravel-enum-pro 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/ */
lazerg / laravel-enum-pro example snippets
enum LevelTypes: int {
use \Lazerg\LaravelEnumPro\EnumPro;
case VERY_EASY = 1;
case EASY = 2;
case MEDIUM = 3;
case STRONG = 4;
case VERY_STRONG = 5
}
LevelTypes::random(int $count = 1); // Collection of $count random values
LevelTypes::randomArray(int $count = 1); // Array of $count random values
LevelTypes::randomFirst(); // One random value
LevelTypes::options(); // Return collection of selectable options
LevelTypes::optionsToArray(); // Return array of selectable options