yevhenii / laravel-migration-vise-versa
用于Laravel的包。此包添加了从现有表创建迁移和模型的功能
dev-master
2019-09-07 09:54 UTC
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~7.0
- sempro/phpunit-pretty-print: ^1.0
This package is auto-updated.
Last update: 2024-09-07 21:16:05 UTC
README
![Packagist上的最新版本][ico-version]
安装
通过Composer
$ composer require yevhenii/laravel-migration-vise-versa
使用方法
要从现有表创建模型,使用以下命令:
$ php artisan table:model posts
其中 "posts" 是表名。
将会创建
- 模型 "Post" 与可填充数组
要从现有表创建模型和迁移,使用以下命令:
$ php artisan table:model posts --m
其中 "posts" 是表名。
将会创建
- 模型 "Post" 和迁移 "create_posts_table"
要从现有表创建迁移,使用以下命令:
$ php artisan table:migration posts
其中 "posts" 是表名。
将会创建
- 迁移文件 "create_posts_table"
要从现有表创建迁移和模型,使用以下命令:
$ php artisan table:migration posts --m
其中 "posts" 是表名。
将会创建
- 迁移文件 "create_posts_table" 和 "Post" 模型
安全
如果您发现任何安全相关的问题,请通过作者邮箱联系,而不是使用问题跟踪器。
许可协议
许可协议。有关更多信息,请参阅许可文件。