Yii2 Gii (generator) with Relation
https://www.paypal.me/yohanesc
Endorse me on LinkedIn
https://www.linkedin.com/in/yohanes-candrajaya-b68394102/
The preferred way to install this extension is through composer.
Either run
$ composer require mootensai/yii2-enhanced-gii:dev-master
$ composer require kartik-v/yii2-mpdf:dev-master # if you want to use pdf exporter
$ composer require kartik-v/yii2-tree-manager:dev-master # if you want to use tree/nested relation table
or add
"mootensai/yii2-enhanced-gii": "dev-master",
"kartik-v/yii2-mpdf": "dev-master",
"kartik-v/yii2-tree-manager": "dev-master"
add
"kartik-v/yii2-mpdf": "dev-master",
if you want to use pdf exporteradd
"kartik-v/yii2-tree-manager": "dev-master",
if you want to use tree/nested relation table
to the require
section of your composer.json
file.
I separate the mpdf & tree-manager because the package is big & not everyone will use it.
Then you must add this code at your config\main.php.
'modules' => [
... //your another module
'gridview' => [
'class' => '\kartik\grid\Module',
// see settings on http://demos.krajee.com/grid#module
],
'datecontrol' => [
'class' => '\kartik\datecontrol\Module',
// see settings on http://demos.krajee.com/datecontrol#module
],
// If you use tree table
'treemanager' => [
'class' => '\kartik\tree\Module',
// see settings on http://demos.krajee.com/tree-manager#module
]
... // your another module
],
See gridview settings on http://demos.krajee.com/grid#module
See datecontrol settings on http://demos.krajee.com/datecontrol#module
See treemanager settings on http://demos.krajee.com/tree-manager#module (If you use tree/nested relation table)
Go to your gii tools, and notice the new IO Generator for models & CRUD
safeUp()
and safeDown()
I'm open for any improvement
Comments