2017 © Pedro Peláez
 

yii2-extension yii2-gii

Yii2 custom generator for gii

image

nhockizi/yii2-gii

Yii2 custom generator for gii

  • Saturday, December 24, 2016
  • by nhockizi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-double-model-gii

This generator generates two ActiveRecord class for the specified database table. An empty one you can extend and a Base one which is the same as the original model generatior., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

$ php composer.phar require "nhockizi/yii2-gii": "dev-master"

or add, (*4)

"nhockizi/yii2-gii": "dev-master"

to the require section of your composer.json file., (*5)

Usage

//if your gii modules configuration looks like below:
    $config['modules']['gii'] = 'yii\gii\Module';

//remove this lines
//Add this into common/config/main-local.php
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'generators' => [
            'Generator Model' => [
                'class' => 'nhockizi\gii\generators\model\Generator',
            ],
            'Generator Crud' => [
                'class'     => 'nhockizi\gii\generators\backend\Generator',
            ],
            'Generator Setup' => [
                'class'     => 'nhockizi\gii\generators\setup\Generator',
            ],
        ],
    ];

// create .htaccess in root files, (*6)

prevent directory listings

Options -Indexes IndexIgnore /, (*7)

follow symbolic links

Options FollowSymlinks, (*8)

RewriteEngine on RewriteRule ^admin(.+)?$ backend/web/$1 [L,PT] RewriteRule ^(.+)?$ frontend/web/$1, (*9)

The Versions

24/12 2016

dev-master

9999999-dev

Yii2 custom generator for gii

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Lâm Xuân Bảo

yii2 gii