Yii 框架代码生成扩展
dev-master / 3.0.x-dev
2024-08-08 10:51 UTC
Requires
- php: ^8.1
- httpsoft/http-basis: ^1.1
- phpspec/php-diff: ^1.1.3
- psr/http-message: ^1.0|^2.0
- rossaddison/yii-middleware: dev-master
- symfony/console: ^6.0|^7.0
- yiisoft/active-record: dev-master
- yiisoft/aliases: ^3.0
- yiisoft/arrays: ^2.1|^3.0
- yiisoft/data-response: ^2.0
- yiisoft/db: *
- yiisoft/friendly-exception: ^1.1
- yiisoft/http: ^1.2
- yiisoft/hydrator: ^1.0
- yiisoft/injector: ^1.1
- yiisoft/input-http: ^1.0
- yiisoft/json: ^1.0
- yiisoft/router: ^3.0
- yiisoft/strings: ^2.1
- yiisoft/validator: ^2.0
- yiisoft/yii-console: ^2.0
Requires (Dev)
- jetbrains/phpstorm-attributes: ^1.0
- maglnet/composer-require-checker: ^4.2
- nyholm/psr7: ^1.5
- phpunit/phpunit: ^10.2
- rector/rector: ^1.0.0
- roave/infection-static-analysis-plugin: ^1.23
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^5.13
- yiisoft/cache: ^3.0
- yiisoft/db-sqlite: dev-master
- yiisoft/di: ^1.1
- yiisoft/dummy-provider: ^1.0
- yiisoft/event-dispatcher: ^1.0
- yiisoft/files: ^2.0
- yiisoft/log: ^2.0
- yiisoft/translator: ^3.0
This package is auto-updated.
Last update: 2024-09-08 10:58:08 UTC
README
Gii 扩展程序 for Yii
本扩展提供了一个基于 Web 的代码生成器,称为 Gii,用于 Yii 框架 应用程序。您可以使用 Gii 快速生成模型、表单、模块、CRUD 等。
要求
- PHP 8.1 或更高版本。
安装
可以使用 Composer 安装此包
composer require yiisoft/yii-gii
通用用法
一旦安装了扩展,只需按照以下方式修改您的应用程序配置:
return [ 'bootstrap' => ['gii'], 'modules' => [ 'gii' => [ 'class' => Yiisoft\Yii\Gii\Gii::class, ], // ... ], // ... ];
然后您可以通过以下 URL 访问 Gii
https:///path/to/index.php?r=gii
或者如果您启用了美观的 URL,您可以使用以下 URL
https:///path/to/index.php/gii
对于控制台应用程序使用相同的配置,您也可以通过以下命令行方式访问 Gii
# change path to your application's base path cd path/to/AppBasePath # show help information about Gii yii help gii # show help information about the model generator in Gii yii help gii/model # generate City model from city table yii gii/model --tableName=city --modelClass=City
文档
如果您需要帮助或有问题,请访问 Yii 论坛。您还可以查看其他 Yii 社区资源。
许可证
Yii 的 Gii 扩展是免费软件。它根据 BSD 许可证发布。有关更多信息,请参阅 LICENSE
。
由 Yii 软件 维护。