PHPackages                             veyselsahin/yii2-giix - 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. [Admin Panels](/categories/admin)
4. /
5. veyselsahin/yii2-giix

ActiveYii2-extension[Admin Panels](/categories/admin)

veyselsahin/yii2-giix
=====================

Extended Gii for Yii 2 Framework

1.4(7y ago)95595[1 issues](https://github.com/veyselsahin/yii2-giix/issues)BSD-3-ClausePHP

Since Aug 12Pushed 7y ago4 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

yii2-giix
=========

[](#yii2-giix)

Extended models and CRUDs for Gii, the code generator of Yii2 Framework

**PROJECT IS IN DEVELOPMENT STAGE!**

What is it?
-----------

[](#what-is-it)

Yii2-Giix provides templates for model and CRUD generation with relation support and a sophisticated UI. A main project goal is porting many features and learnings from yii2-giiant, gtc, giix, awecrud and others into one solution.

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

[](#installation)

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

```
composer.phar require veyselsahin/yii2-giix:"*"

```

The generators are registered automatically in the application bootstrap process, if the Gii module is enabled

Usage
-----

[](#usage)

Visit your application's Gii (eg. `index.php?r=gii` and choose one of the generators from the main menu screen.

For basic usage instructions see the [Yii2 Guide section for Gii](http://www.yiiframework.com/doc-2.0/guide-tool-gii.html).

### Command Line Batches

[](#command-line-batches)

You can run batches of base-model and CRUD generation with the build in batch command:

```
./yii giix-batch --tables=profile,social_account,user,token

```

It will process the given tables, for more details see `./yii help giix-batch`.

Features
--------

[](#features)

### Model generator

[](#model-generator)

- generates separate model classes to customize and base models classes to regenerate
- table prefixes can be stipped off model class names (not bound to db connection setting)

### CRUD generator

[](#crud-generator)

- model, view and controller locations can be customized to use subfolders
- horizontal and vertical form layout
- action button class customization
- input, attribute, column and relation customization with provider queue
- callback provider to inject any kind of code for inputs, attributes and columns via dependency injection

#### Providers

[](#providers)

- *CallbackProvider* universal provider to modify any input, attribute or column with highly flexible callback functions
- *RelationProvider* renders code for relations (eg. links, dropdowns)
- *EditorProvider* renders RTE, like `Ckeditor` as input widget
- *DateTimeProvider* renders date inputs

Use custom generators, model and crud templates
-----------------------------------------------

[](#use-custom-generators-model-and-crud-templates)

```

    $config['modules']['gii'] = [
            'class'      => 'yii\gii\Module',
            'allowedIPs' => ['127.0.0.1'],
            'generators' => [
                // generator name
                'rb-model' => [
                    //generator class
                    'class'     => 'veyselsahin\giix\model\Generator',
                    //setting for out templates
                    'templates' => [
                        // template name => path to template
                        'rbModel' =>
                            '@app/giiTemplates/model/default',

                    ]
                ]
            ],
        ];

```

Customization with providers
----------------------------

[](#customization-with-providers)

In many cases you want to exchange i.e. some inputs with a customized version for your project. Examples for this use-case are editors, file-uploads or choosers, complex input widget with a modal screen, getting data via AJAX and so on.

With Yii2-Giix Providers you can create a queue of instances which may provide custom code depending on more complex rules. Take a look at some existing [giix providers](https://github.com/veyselsahin/yii2-giix/tree/develop/crud/providers).

Configure providers, add this to your provider list in the form:

```
\veyselsahin\giix\crud\providers\EditorProvider,
\veyselsahin\giix\crud\providers\SelectProvider,

```

And configure the settings of the provider, add setting via dependecy injection this to your application config, eg. in `console/config/bootstrap.php`:

```
\Yii::$container->set(
    'veyselsahin\giix\crud\providers\EditorProvider',
    [
        'columnNames' => ['description']
    ]
);

```

This will render a Ckeditor widget for every column named `description`.

```

```

### Universal `CallbackProvider`

[](#universal-callbackprovider)

Configuration via DI container:

```
\Yii::$container->set(
    'veyselsahin\giix\crud\providers\CallbackProvider',
    [

        'activeFields'  => [

           /**
            * Generate a checkbox for specific column (model attribute)
            */
           'common\models\Foo.isAvailable' => function ($attribute, $generator) {
               $data = \yii\helpers\VarDumper::export([0 => 'Nein', 1 => 'Ja']);
               return  [

           /**
            * generate custom HTML in column
            */
           'common\models\Foo.html' => function ($attribute, $generator) {

               return  'item_id',
    'value'=> function(\$model){
        return \yii\helpers\Html::a(\$model->bar,['/crud/item/view', 'id' => \$model->link_id]);
    }
]
FORMAT;
           },

           /**
            * hide all text fields in grid
            */
           '.+' => function ($column, $model) {
                    if ($column->dbType == 'text') {
                        return false;
                    }
           },

           /**
            * hide system fields in grid
            */
           'created_at$|updated_at$' => function () {
                   return false;
           },

        ]
    ]
);

```

Extras
------

[](#extras)

A detailed description how to use MySQL workbench for model updates and migration see [here](docs/using-mysql-workbench.md).

Links
-----

[](#links)

- [GitHub](https://github.com/veyselsahin/yii2-giix)
- [Packagist](https://packagist.org/packages/veyselsahin/yii2-giix)

php yii.php giix-batch --modelDb=cafees --modelBaseClass=common\\models\\VysModel --modelNamespace=backend\\models --tables=gruplar,sinav,sinav\_sonuc

php yii.php giix-batch --modelDb=cafees --modelBaseClass=common\\models\\VysModel --modelNamespace=backend\\models

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~432 days

Total

4

Last Release

2629d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/abb30b9e90ea9bbd66d3f41f1fabfa2d02c3352c2be2a95cac47278c9b669976?d=identicon)[veyselsahin](/maintainers/veyselsahin)

---

Top Contributors

[![veyselsahin](https://avatars.githubusercontent.com/u/2998379?v=4)](https://github.com/veyselsahin "veyselsahin (13 commits)")

---

Tags

yii2crudgii

### Embed Badge

![Health badge](/badges/veyselsahin-yii2-giix/health.svg)

```
[![Health](https://phpackages.com/badges/veyselsahin-yii2-giix/health.svg)](https://phpackages.com/packages/veyselsahin-yii2-giix)
```

###  Alternatives

[schmunk42/yii2-giiant

Gii CRUD generator for Yii 2 Framework

269471.5k17](/packages/schmunk42-yii2-giiant)

PHPackages © 2026

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