PHPackages                             gvasilopulos/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. [Framework](/categories/framework)
4. /
5. gvasilopulos/yii2-enhanced-gii

ActiveYii2-extension[Framework](/categories/framework)

gvasilopulos/yii2-enhanced-gii
==============================

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

v1.0.0(9y ago)0245[1 PRs](https://github.com/gvasilopulos/yii2-enhanced-gii/pulls)BSD-3-ClausePHP

Since Jul 10Pushed 9y ago1 watchersCompare

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

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

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

[](#yii2-enhanced-gii)

Yii2 Gii (generator) with Relation forked from

Specific for postgres with uuid id's generated from php through ramsey/uuid Beware! This extension does not use uuid-oosp functions it generates v4 uuid with UUID behaviour

You have to add this to your configuration db connection setting so it detects uuid column properly

```
       'schemaMap' => [
        'pgsql'=> [
        'class'=>'gvasilopulos\enhancedgii\db\pgsql\Schema',
        'defaultSchema' => 'public' //specify your schema here
         ],
        ],

```

You can change the Schema name to whatever you use

[![Yii2](https://camo.githubusercontent.com/d6b0929173e28cc627430d2519ca1853466a70f37395877eaf4820cb3e1e1909/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f77657265645f62792d5969695f4672616d65776f726b2d677265656e2e7376673f7374796c653d666c6174)](http://www.yiiframework.com/)

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

[](#installation)

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

Either run

```
$ composer require gvasilopulos/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

```
"gvasilopulos/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
      'dynagrid'=> [
        'class'=>'\kartik\dynagrid\Module',
        // other module settings
      ],
    ],
```

See gridview settings on

See datecontrol settings on

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

See dynagrid settings on  if you use mediman crud template!

Usage :
-------

[](#usage-)

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

\#Features

Model :
-------

[](#model-)

1. Generate optimistic lock
2. Generate Timestamp Behaviors
3. Generate Blameable Behavior
4. Generate UUID Behavior and uuid's through php (default behavior)

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
10. generate dynagrid grid view for index.php if you choose mediman template on crud (you need to add tbl\_dynagrid and tbl\_dynagrid\_dtl tables on your database or set the appropriate tables on module settings as described in

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

[](#migration-generator-)

1. Generate migration from your database structure (based on : )

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 )
5. thamtech () for uuid helpers/validators
6. wartron () UUID behavior
7. fgh151 () for guidance through schema customization

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 99% 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://www.gravatar.com/avatar/5b4d02c71a386399201d2e4ea1b1684258b47dd9d530e89f2cbb2644518c2f4b?d=identicon)[gvasilopulos](/maintainers/gvasilopulos)

---

Top Contributors

[![mootensai](https://avatars.githubusercontent.com/u/5844149?v=4)](https://github.com/mootensai "mootensai (199 commits)")[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (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/gvasilopulos-yii2-enhanced-gii/health.svg)

```
[![Health](https://phpackages.com/badges/gvasilopulos-yii2-enhanced-gii/health.svg)](https://phpackages.com/packages/gvasilopulos-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)[yiisoft/yii2-queue

Yii2 Queue Extension which supports queues based on DB, Redis, RabbitMQ, Beanstalk, SQS, and Gearman

1.1k10.4M155](/packages/yiisoft-yii2-queue)

PHPackages © 2026

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