2017 © Pedro Peláez
 

yii2-extension yii2-giiall

Using Yii2-Gii to generate code for other PHP framework, such as PhalconEye, Laravel, etc.

image

trandangtri/yii2-giiall

Using Yii2-Gii to generate code for other PHP framework, such as PhalconEye, Laravel, etc.

  • Thursday, June 19, 2014
  • by trandangtri
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2 - Gii All

Goals

Using Yii2-Gii to generate code for other PHP framework, such as Phalcon, PhalconEye, Laravel, etc., (*1)

PROJECT IS IN DEVELOPMENT STAGE!, (*2)

Installation

Create a basic yii application., (*3)

php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic /path/to/yii-application

Go to the project directory and install yii2-giiall, (*4)

cd yii-application
php composer.phar require trandangtri/`yii2-giiall` @dev-master

Edit the application config..., (*5)

edit config/web.php

... and add the yii2-giiall generator in the YII_ENV_DEV section, (*6)

$config['modules']['gii'] = array();
$config['modules']['gii']['class'] = 'yii\gii\Module';
$config['modules']['gii'] = [
    'class'      => 'yii\gii\Module',
    'allowedIPs' => ['::1', '192.168.1.*'],
    'generators' => [
        // ...
        'phalconeye-model' => [
            'class' => 'trandangtri\giiall\phalconeye\model\Generator',
            'appPath' => '../../app/'
        ],
        // ...
    ],
];

Remember setup the appPath to point to the application folder of your Core application. In this case, it pointed to PhalconEye application folder, (*7)

And don't forget to setup a database application component, eg., (*8)

'db' => [
     'class' => 'yii\db\Connection',
     'dsn' => 'mysql:host=localhost;dbname=devdb',
     'username' => 'root',
     'password' => 'root',
     'charset' => 'utf8',
],

Open Gii..., (*9)

http://localhost/index.php?r=gii

...and select the yii2-giiall template, you may need to create some models in advance., (*10)

References

The Versions

19/06 2014

dev-master

9999999-dev https://github.com/trandangtri/yii2-giiall

Using Yii2-Gii to generate code for other PHP framework, such as PhalconEye, Laravel, etc.

  Sources   Download

BSD-3-Clause

The Requires

 

laravel yii2 gii generator phalconeye