santosalan/laravel-crud

生成 Laravel CRUD

v1.1.15 2020-09-08 21:27 UTC

README

使用 Composer 安装

php composer.phar require santosalan/laravel-crud

Doctrine Inflectors - 不规则复数和单数

config/app.php 中添加它

/**
 * Irregulares Words
 */
'doctrine-inflector' => [
    'plural' => [
        'irregular' => [
            'traducao' => 'traducoes',
        ],
    ],

    'singular' => [
        'irregular' => [
            'traducoes' => 'traducao',
        ],
    ],
],

app/Providers/AppServiceProvider.php 中添加它

public function boot()
{
    // Doctrine Irregular Rules
    Inflector::rules('plural', config('app.doctrine-inflector.plural'));
    Inflector::rules('singular', config('app.doctrine-inflector.singular'));
}

查看帮助

php artisan make:crud -h

查看表格

php artisan make:crud

生成基本的 Laravel-CRUD 示例

php artisan make:crud --tables [ all | table_number ] --path-models 'App\Models' --routes [ y | n ] --theme [1=AdminLTE | 2=Porto Admin]

或者

php artisan make:crud -t [ all | table_number ] -p 'App\Models' -r [ y | n ] -T [1=AdminLTE | 2=Porto Admin]

为 santosalan/lumen-crud 核心生成基本的 Laravel-CRUD API 客户端

php artisan make:crud --tables [ all | table_number ] --path-models 'App\Models' --routes [ y | n ] --api-client Y

或者

php artisan make:crud -t [ all | table_number ] -p 'App\Models' -r [ y | n ] -a Y

发布提供者

php artisan vendor:publish --provider 'SantosAlan\LaravelCrud\ServiceProvider'

注意:如果生成 CRUD API 客户端,则需要在 app/Services/CoreApiService.php 中配置系统核心 Lumen CRUD 服务器的数据

注意:所有文件将被替换