pcrt/yii2-gii

Alternative Gii generator for Yii2 framework

1.0.9 2020-06-09 17:44 UTC

This package is auto-updated.

Last update: 2024-03-29 03:58:04 UTC


README

Additional Gii code generator .

This extension add code generator to Yii2 framework Gii extension.

##Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require pcrt/yii2-gii "*"

or add

"pcrt/yii2-gii": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, modify your application configuration to include:

  $config['modules']['gii'] = [
      'class' => 'yii\gii\Module',
      ....
      'generators' => [ // HERE
          'pcrtmodel' => [
              'class' => 'pcrt\generators\model\Generator',
              'templates' => [
                  'pcrt' => '@vendor/pcrt/yii2-gii/generators/model/pcrt',
              ]
          ],
          'pcrtcrud' => [
              'class' => 'pcrt\generators\crud\Generator',
              'templates' => [
                  'pcrt' => '@vendor/pcrt/yii2-gii/generators/crud/pcrt',
              ]
          ]
      ],
      ....
      // uncomment the following to add your IP if you are not connecting from localhost.
      // 'allowedIPs' => ['127.0.0.1', '::1'],
  ];

License

Yii2-gii is released under the BSD-3 License. See the bundled LICENSE.md for details.

Enjoy!