herroffizier / yii2-gii-custom
Collection of custom generators for Gii.
Installs: 578
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Type:yii2-extension
Requires
This package is not auto-updated.
Last update: 2024-11-09 19:35:33 UTC
README
Gii custom is a small collection of generators for personal use. This package should not be considered as stable!
Installation
Install collection via Composer:
composer require "herroffizier/yii2-gii-custom:@stable"
Extend your Gii config:
[ 'class' => 'yii\gii\Module', // ... 'generators' => [ // Add generators: 'baseModel' => [ 'class' => 'herroffizier\gii\model\Generator', ], 'simplifiedCrud' => [ 'class' => 'herroffizier\gii\crud\Generator', ], ], ]
Generators
Base + User Model Generator
Generator creates base and user models for specified table. Base model should be never touched so it can be easily regenerated when needed (for example, when new relations added). User model is a place for your code. It extends from base model and contains no autogenerated code.
Simplified CRUD Generator
Based on default CRUD generator Simplified CRUD Generator skips view and search pages. Also it includes some minor changes in code like merging behaviors with parent.