PHP code example of hyder / laravel-utils
1. Go to this page and download the library: Download hyder/laravel-utils 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/ */
hyder / laravel-utils example snippets
// config/laravel-utils.php
return [
'enums' => [
// Directory path where enum classes are located
'dir_path' => app_path('Enums'),
// Namespace for enum classes
'namespace' => 'App\Enums',
],
];
$enums = Enum::list();
use Hyder\LaravelUtils\Facades\Enum;
Enum::setDirectory('path/to/enums')
->setNamespace('App\Enums')
->list();