PHPackages                             pafnow/yii2-giiant - 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. pafnow/yii2-giiant

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

pafnow/yii2-giiant
==================

Gii CRUD generator for Yii 2 Framework

091PHP

Since Aug 24Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

What is changed?
----------------

[](#what-is-changed)

- Traits for CRUD controllers action
- RelationProvider orderBy displayed name in dropdown fields
- Custom dbType yii2image ad yii2file for image and file automatic model generation
- CRUD FileProvider to handle image upload

yii2-giiant
===========

[](#yii2-giiant)

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

**PROJECT IS IN DEVELOPMENT STAGE!**

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

[](#what-is-it)

Giiant 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 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 schmunk42/yii2-giiant:"*"

```

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 giiant-batch --tables=profile,social_account,user,token

```

It will process the given tables, for more details see `./yii help giiant-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

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 Giiant Providers you can create a queue of instances which may provide custom code depending on more complex rules. Take a look at some existing [giiant providers](https://github.com/schmunk42/yii2-giiant/tree/develop/crud/providers).

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

```
\schmunk42\giiant\crud\providers\EditorProvider,
\schmunk42\giiant\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(
    'schmunk42\giiant\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(
    'schmunk42\giiant\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).

Special thanks to [motin](https://github.com/motin), [thyseus](https://github.com/thyseus), [uldisn](https://github.com/uldisn) and [rcoelho](https://github.com/rcoelho) for their work, inspirations and feedback.

Links
-----

[](#links)

- [Phundament.com](http://phundament.com)
- [GitHub](https://github.com/schmunk42/yii2-giiant)
- [Packagist](https://packagist.org/packages/schmunk42/yii2-giiant)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a9ba98d9321bd5a190df864de62767fdabeeb51d0485b42f1473aa7b5828714?d=identicon)[pafnow](/maintainers/pafnow)

---

Top Contributors

[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (161 commits)")[![pafnow](https://avatars.githubusercontent.com/u/8747037?v=4)](https://github.com/pafnow "pafnow (17 commits)")[![motin](https://avatars.githubusercontent.com/u/793037?v=4)](https://github.com/motin "motin (2 commits)")[![einar-lanfranco](https://avatars.githubusercontent.com/u/3857748?v=4)](https://github.com/einar-lanfranco "einar-lanfranco (1 commits)")

---

Tags

yii2

### Embed Badge

![Health badge](/badges/pafnow-yii2-giiant/health.svg)

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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