wtf / generator
WTF 框架的生成器
dev-master
2018-04-06 12:04 UTC
Requires
- symfony/console: ^4.0
This package is auto-updated.
Last update: 2024-09-13 21:51:09 UTC
README
为 wtf 模块生成标准代码。
可以生成以下内容
- 实体
- 控制器
- 迁移
- 种子
- 路由
- 测试
- CRUD(通过一个命令生成控制器、实体、迁移、路由和测试,并选择名称)
配置
将 generator.php
放置在任意位置
<?php $app = dirname(__DIR__).'/'; return [ 'paths' => [ 'app' => $app, 'controller' => $app.'src/Controller/', 'entity' => $app.'src/Entity/', 'test' => $app.'tests/', 'route' => $app.'config/routes/', ], ];
运行生成器:bin/wtf generate:crud hello -c /path/to/generator-config.php
注意
- 生成器是一个实验性项目(目前)