minms / yii2-gii-model-auto-generator
There is no license information available for the latest version (1.1.1) of this package.
批量将数据库中的表自动生成为YII2的AR模型
1.1.1
2018-03-20 15:21 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: ~2.1
- yiisoft/yii2-gii: ~2.1
This package is auto-updated.
Last update: 2025-04-06 00:39:48 UTC
README
批量将数据库中的表自动生成为YII2的AR模型
使用方法
composer require "minms/yii2-gii-model-auto-generator:dev-master"
YII2高级模板
在console/config/main.php中加入
'controllerMap' => [
'auto' => [
'class' => 'minms\gii\AutoGeneratorController',
//'yiiPath' => '/path/to/yii',
//'ns' => 'common\\\\models\\\\base', //生成的类存放位置, 默认common/models/base
//'db' => 'db', //使用的数据库, 默认db
]
],
执行命令
php yii auto
或
./yii auto