santosalan/lumen-crud
Generate Lumen API CRUD
107
1
| Install | |
|---|---|
composer require santosalan/lumen-crud |
|
| Latest Version: | v1.0.5 |
| PHP: | >=7.1.3 |
| License: | MIT |
| Last Updated: | Mar 29, 2019 |
| Links: | GitHub · Packagist |
Maintainer: santosalan
santosalan/lumen-crud
Install with Composer
php composer.phar require santosalan/lumen-crud
Enable it in bootstrap/app.php
$app->withFacades();
$app->withEloquent();
Add it in bootstrap/app.php
$app->register(SantosAlan\LumenCrud\ServiceProvider::class);
Doctrine Inflectors - Irregular Plural and Singular
Create, if not exists, file config/app.php and register this
return [
/**
* Irregulares Words
*/
'doctrine-inflector' => [
'plural' => [
'irregular' => [
'traducao' => 'traducoes',
],
],
'singular' => [
'irregular' => [
'traducoes' => 'traducao',
],
],
],
];
Add it in bootstrap/app.php before return $app;
$app->boot();
Inflector::rules('plural', config('app.doctrine-inflector.plural'));
Inflector::rules('singular', config('app.doctrine-inflector.singular'));
See Help
php artisan make:lumen-crud -h
See Tables
php artisan make:lumen-crud
Generate a Basic Lumen-CRUD
php artisan make:lumen-crud --tables [ all | table_number ] --path-models 'App\Models' --routes=[ y | n ] --base-model [ y | n ]
or
php artisan make:lumen-crud -t [ all | table_number ] -p 'App\Models' -r [ y | n ] -b [ y | n ]
Caution: All files will be replaced