mitirrli/yii2-gii-rest

RESTful generator for gii

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

2.4 2023-10-26 08:46 UTC

This package is auto-updated.

Last update: 2024-10-26 11:02:54 UTC


README

Gii 模块的REST代码生成器,包含Model和Controller。 Forked from bestyii/yii2-gii-rest。

安装 Installation

通过 composer安装.

项目中直接运行

composer require mitirrli/yii2-gii-rest

or add

"mitirrli/yii2-gii-rest": "*"

或者添加下面代码到 composer.json文件

使用 Usage

config/web.php 配置文件中,gii的配置部分增加模版:

$config['modules']['gii'] = [
    'class' => 'yii\gii\Module',
    'generators' => [
        'rest-model' => [
            'class' => 'mitirrli\giiRest\generators\model\Generator',
        ],
        'rest-crud' => [
            'class' => 'mitirrli\giiRest\generators\crud\Generator',
        ]
    ],
];

运行gii,可以看到增加了REST Model GeneratorREST CRUD Generator两个生成器。