shirase55/yii2-gii-fixture-generator

This package is abandoned and no longer maintained. No replacement package was suggested.

Fixture class generator for Gii module of Yii2 Framework.

Installs: 198

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 3

Type:yii2-extension

2.0.1 2017-04-12 10:11 UTC

This package is not auto-updated.

Last update: 2017-06-15 06:17:21 UTC


README

The extension allows to generate fixture class on base of existing ActiveRecord model class. Also it allows to grab existing records from database into fixture data file.

Fixture Generator

Installation

Install with composer:

composer require --dev shirase55/yii2-gii-fixture-generator

or add

"shirase55/yii2-gii-fixture-generator": "*"

to the require section of your composer.json file.

Add new generator into your Gii module config:

$config['modules']['gii'] = [
    'class' => 'yii\gii\Module',
    'generators' => [
        'fixture' => [
            'class' => 'shirase55\gii\fixture\Generator',
        ],
    ],
];

And add the following line:

Yii::setAlias('@tests', dirname(__DIR__) . '/tests');

in top of your config/web.php file.