yiisoft / yii-gii
Yii 框架代码生成扩展
dev-master / 3.0.x-dev
2024-09-19 05:22 UTC
Requires
- php: ^8.1
- httpsoft/http-basis: ^1.1
- phpspec/php-diff: ^1.1.3
- psr/http-message: ^1.0|^2.0
- symfony/console: ^6.0|^7.0
- yiisoft/active-record: dev-master
- yiisoft/aliases: ^3.0
- yiisoft/arrays: ^2.1|^3.0
- yiisoft/csrf: ^2.1.1
- 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
- yiisoft/yii-middleware: ^1.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.2
- 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-19 05:23:36 UTC
README
Gii 扩展程序用于 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
http://localhost/path/to/index.php?r=gii
或如果您已启用美观的 URL,您可以使用以下 URL
http://localhost/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
文档
- 指南:[英文](https://github.com/yiisoft/yii-gii/blob/HEAD/docs/guide/en/README.md),[葡萄牙语 - 巴西](https://github.com/yiisoft/yii-gii/blob/HEAD/docs/guide/pt-BR/README.md),[俄语](https://github.com/yiisoft/yii-gii/blob/HEAD/docs/guide/ru/README.md),[日语](https://github.com/yiisoft/yii-gii/blob/HEAD/docs/guide/ja/README.md),[中文](https://github.com/yiisoft/yii-gii/blob/HEAD/docs/guide/zh-CN/README.md)
- 内部
如果您需要帮助或有疑问,[Yii 论坛](https://forum.yiiframework.com/c/yii-3-0/63) 是一个好地方。您还可以查看其他 [Yii 社区资源](https://yiiframework.cn/community)。
许可协议
Yii 的 Gii 扩展是免费软件。它根据 BSD 许可协议发布。有关更多信息,请参阅 LICENSE
。
由 Yii 软件 维护。