PHP code example of levintoo / laravel-enum-exporter

1. Go to this page and download the library: Download levintoo/laravel-enum-exporter 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/ */

    

levintoo / laravel-enum-exporter example snippets


/* app/Enums/UserStatus.php */
enum UserStatus: string
{
    case Active = 'active';
    case Inactive = 'inactive';
    case Pending = 'pending';
}
bash
php artisan export:enum Role
# or
php artisan export:enum app/Enums/Role.php
bash
php artisan export:enum Role --js
# or
php artisan export:enum --all --js