PHPackages                             kllakk/yii2-enhanced-gii - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kllakk/yii2-enhanced-gii

ActiveYii2-extension

kllakk/yii2-enhanced-gii
========================

Generate Relational (hasMany, hasOne, belongsTo, &amp; nested) Models &amp; CRUD.

v1.0.0(9y ago)035BSD-3-ClausePHP

Since Jul 10Pushed 5y agoCompare

[ Source](https://github.com/kllakk/yii2-enhanced-gii)[ Packagist](https://packagist.org/packages/kllakk/yii2-enhanced-gii)[ RSS](/packages/kllakk-yii2-enhanced-gii/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (10)Versions (9)Used By (0)

yii2-enhanced-gii
=================

[](#yii2-enhanced-gii)

Yii2 Gii (generator) with Relation

[![Latest Stable Version](https://camo.githubusercontent.com/65283b953c47f7948f439c20cd42f7500ad747bf910caf4b20300483eca2ce37/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6f74656e7361692f796969322d656e68616e6365642d6769692f762f737461626c65)](https://packagist.org/packages/mootensai/yii2-enhanced-gii)[![License](https://camo.githubusercontent.com/2405a8bd22b90a01674eacb0399af9a3785baa97df6af2bde10713b617806185/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6f74656e7361692f796969322d656e68616e6365642d6769692f6c6963656e7365)](https://packagist.org/packages/mootensai/yii2-enhanced-gii)[![Total Downloads](https://camo.githubusercontent.com/5cf06c565acfe56110172c11f12f0f366b029710d5c1554c36f66ff9e5587092/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6f74656e7361692f796969322d656e68616e6365642d6769692f646f776e6c6f616473)](https://packagist.org/packages/mootensai/yii2-enhanced-gii)[![Monthly Downloads](https://camo.githubusercontent.com/bd0940062814f6ea1013b2500ad752754dc4b2828a8a07ed2de763265d4ff990/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6f74656e7361692f796969322d656e68616e6365642d6769692f642f6d6f6e74686c79)](https://packagist.org/packages/mootensai/yii2-enhanced-gii)[![Daily Downloads](https://camo.githubusercontent.com/a34ad2870e486de1e59aeddf5c009bd242a37b2fc555cf9dd9c062055b80824f/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6f74656e7361692f796969322d656e68616e6365642d6769692f642f6461696c79)](https://packagist.org/packages/mootensai/yii2-enhanced-gii)[![Join the chat at https://gitter.im/mootensai/yii2-enhanced-gii](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/mootensai/yii2-enhanced-gii?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![Yii2](https://camo.githubusercontent.com/d6b0929173e28cc627430d2519ca1853466a70f37395877eaf4820cb3e1e1909/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f77657265645f62792d5969695f4672616d65776f726b2d677265656e2e7376673f7374796c653d666c6174)](http://www.yiiframework.com/)

Support
-------

[](#support)

[![Support via Gratipay](https://camo.githubusercontent.com/1c5285a90da2f0b1ee32a7136cacdc9230404760abc467b90492670975ad5bd6/68747470733a2f2f63646e2e7261776769742e636f6d2f67726174697061792f67726174697061792d62616467652f322e332e302f646973742f67726174697061792e737667)](https://gratipay.com/mootensai/)

Endorse me on LinkedIn

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

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 exporter

> add `"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 &amp; tree-manager because the package is big &amp; 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

See datecontrol settings on

See treemanager settings on  (If you use tree/nested relation table)

Usage :
-------

[](#usage-)

Go to your gii tools, and notice the new IO Generator for models &amp; CRUD

Features
========

[](#features)

Model :
-------

[](#model-)

1. Generate optimistic lock
2. Generate Timestamp Behaviors
3. Generate Blameable Behavior
4. Generate UUID Behavior
5. Generate Soft Delete Behavior (NEW! Todo : Generate data filtering for relation data, e.g. not show deleted children of hasMany )

CRUD :
------

[](#crud-)

1. Generate all CRUD with wildcard (\*) of table
2. Generate related input output
3. Specify your name/label attribute for foreign keys
4. Set your column to hidden
5. Specify your skipped columns
6. Specify your skipped relations
7. Set pluralize or not
8. PDF Printable view
9. Expandable / collapsible row at index grid view for related data

Migration Generator :
---------------------

[](#migration-generator-)

1. Generate migration from your database structure (based on : )
2. Option to generate with `safeUp()` and `safeDown()`

To Do
=====

[](#to-do)

1. One-page-CRUD template
2. Implement generator for Soft Delete Behavior ()

I'm open for any improvement

Screenshot
==========

[](#screenshot)

Model Generator
---------------

[](#model-generator)

[![enhanced gii - model](https://cloud.githubusercontent.com/assets/5844149/13099130/db81fc46-d561-11e5-85ca-a9f3c38e68d8.PNG)](https://cloud.githubusercontent.com/assets/5844149/13099130/db81fc46-d561-11e5-85ca-a9f3c38e68d8.PNG)

CRUD Generator
--------------

[](#crud-generator)

[![enhanced gii - crud](https://cloud.githubusercontent.com/assets/5844149/16199521/10efff98-3734-11e6-8bab-2fc6e85c0b38.png)](https://cloud.githubusercontent.com/assets/5844149/16199521/10efff98-3734-11e6-8bab-2fc6e85c0b38.png)

Index
-----

[](#index)

### Grid View

[](#grid-view)

[![enhanced gii - index grid](https://cloud.githubusercontent.com/assets/5844149/16200077/0f478092-3736-11e6-9c85-873ea463816d.png)](https://cloud.githubusercontent.com/assets/5844149/16200077/0f478092-3736-11e6-9c85-873ea463816d.png)

### List View

[](#list-view)

[![enhanced gii - index list](https://cloud.githubusercontent.com/assets/5844149/16200165/5911c818-3736-11e6-9f85-38b8c0dbc65d.png)](https://cloud.githubusercontent.com/assets/5844149/16200165/5911c818-3736-11e6-9f85-38b8c0dbc65d.png)

View
----

[](#view)

[![enhanced gii - view](https://cloud.githubusercontent.com/assets/5844149/16200282/ddf2f1b0-3736-11e6-8792-a541a5571adb.png)](https://cloud.githubusercontent.com/assets/5844149/16200282/ddf2f1b0-3736-11e6-8792-a541a5571adb.png)

Form
----

[](#form)

[![enhanced gii - create](https://cloud.githubusercontent.com/assets/5844149/16201809/39ce715c-373d-11e6-86cd-bf80b37fafd6.png)](https://cloud.githubusercontent.com/assets/5844149/16201809/39ce715c-373d-11e6-86cd-bf80b37fafd6.png)

[![enhanced gii - update](https://cloud.githubusercontent.com/assets/5844149/16201857/61b09bd2-373d-11e6-9a46-bb6c82bb183f.png)](https://cloud.githubusercontent.com/assets/5844149/16201857/61b09bd2-373d-11e6-9a46-bb6c82bb183f.png)

Nested / Tree
-------------

[](#nested--tree)

[![enhanced gii - nested](https://cloud.githubusercontent.com/assets/5844149/16476447/bdae9a1c-3eb1-11e6-8dc3-a20a06a3148b.png)](https://cloud.githubusercontent.com/assets/5844149/16476447/bdae9a1c-3eb1-11e6-8dc3-a20a06a3148b.png)

Migration Generator
===================

[](#migration-generator)

[![migration form](https://cloud.githubusercontent.com/assets/5844149/15350030/08ab4d58-1d01-11e6-87b7-4dd621a5bef6.JPG)](https://cloud.githubusercontent.com/assets/5844149/15350030/08ab4d58-1d01-11e6-87b7-4dd621a5bef6.JPG)

Thanks To
=========

[](#thanks-to)

1. Jiwanndaru () for creating the tradition
2. kartik-v () for most of widgets
3. schmunk42 () for bootstrap &amp; model base &amp; extension
4. mdmunir () for JsBlock &amp; Migration Generator (from )

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Recently: every ~90 days

Total

8

Last Release

3553d ago

Major Versions

0.0.9 → v1.0.02016-08-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5989993?v=4)[kllakk](/maintainers/kllakk)[@kllakk](https://github.com/kllakk)

---

Top Contributors

[![mootensai](https://avatars.githubusercontent.com/u/5844149?v=4)](https://github.com/mootensai "mootensai (236 commits)")[![kllakk](https://avatars.githubusercontent.com/u/5989993?v=4)](https://github.com/kllakk "kllakk (11 commits)")[![gvasilopulos](https://avatars.githubusercontent.com/u/7271039?v=4)](https://github.com/gvasilopulos "gvasilopulos (2 commits)")[![cgernert](https://avatars.githubusercontent.com/u/17023559?v=4)](https://github.com/cgernert "cgernert (2 commits)")[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (1 commits)")[![derekisbusy](https://avatars.githubusercontent.com/u/5118781?v=4)](https://github.com/derekisbusy "derekisbusy (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

yii2yiigiirelationEnhanced

### Embed Badge

![Health badge](/badges/kllakk-yii2-enhanced-gii/health.svg)

```
[![Health](https://phpackages.com/badges/kllakk-yii2-enhanced-gii/health.svg)](https://phpackages.com/packages/kllakk-yii2-enhanced-gii)
```

###  Alternatives

[mootensai/yii2-enhanced-gii

Generate Relational (hasMany, hasOne, belongsTo, &amp; nested) Models &amp; CRUD.

202174.6k5](/packages/mootensai-yii2-enhanced-gii)[sintret/yii2-gii-adminlte

Yii2 Generator extension for Gii plugin with adminlte and base on dynagrid. upload excel to system to with log upload

209.6k2](/packages/sintret-yii2-gii-adminlte)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
