Download the PHP package dobron/laravel-db-enum-generator without Composer
On this page you can find all versions of the php package dobron/laravel-db-enum-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package laravel-db-enum-generator
Laravel Enum
Laravel package that introduces a new Artisan command to generate Enum classes fetched from database.
π Requirements
- PHP 7.0 or higher
- Laravel 5.6 or higher
π¦ Install
Via Composer
β‘οΈ Usage
Enums can be generated by calling the Artisan command make:enum
and specifying the class or table name, and columns for key and value(s).
Id | Slug | Role |
---|---|---|
1 | MANAGER | Admin |
2 | CONTENT_CREATOR | Editor |
3 | MODERATOR | Moderator |
4 | ADVERTISER | Advertiser |
5 | INSIGHTS_ANALYST | Analyst |
βοΈ Options
Option | Description | Default |
---|---|---|
model | Eloquent model class name | |
table | (or) The database table name | |
path | The path to generate enums in | |
id | ID column name | id |
slug | Slug column name | slug |
value | Column(s) name for map separated by comma | |
force | Create the class even if the enum already exists | false |
π Change log
Please see CHANGELOG for more information on what has changed recently.
π§ͺ Testing
π€ Contributing
Please see CONTRIBUTING for details.
π Credits
βοΈ License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-db-enum-generator with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.0 || ^8.0
illuminate/console Version ^5.6|^5.7|^5.8|^6.0|^7.0|^8.0|^9.0|^10.0
illuminate/support Version ^5.6|^5.7|^5.8|^6.0|^7.0|^8.0|^9.0|^10.0
illuminate/console Version ^5.6|^5.7|^5.8|^6.0|^7.0|^8.0|^9.0|^10.0
illuminate/support Version ^5.6|^5.7|^5.8|^6.0|^7.0|^8.0|^9.0|^10.0
The package dobron/laravel-db-enum-generator contains the following files
Loading the files please wait ....