govindtomar/crudgenerator

Laravel crud 生成器

v1.2.2 2022-11-02 17:30 UTC

This package is auto-updated.

Last update: 2024-09-30 01:20:23 UTC


README

安装

composer require govindtomar/crudgenerator
php artisan vendor:publish --provider="GovindTomar\CrudGenerator\CrudGeneratorServiceProvider"

配置

您将在 config/crud.php 找到配置文件

'code_type' => 'API',

示例

CRUD 创建

php artisan make:crud ContactMe --fields=text*name,email*email,text*subject,textarea*message

带有关系的 CRUD

php artisan make:crud ContactMe --fields=text*name,email*email,text*subject,textarea*message --model=User

带有迁移的 CRUD

php artisan make:crud ContactMe --fields=text*name,email*email,text*subject,textarea*message --migration=yes

带有关系和迁移的 CRUD

php artisan make:crud Post --fields="text*name,image*profile,image*cover,select*user",toggle*status,toggle*publish --model=User --migration=yes

可用字段

text | email | file | hidden | image | number | password | date | radio | select | textarea | toggle