Skip to content

ElisDN/yii2-gii-fixture-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fixture class generator for Gii module of Yii2 Framework

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 elisdn/yii2-gii-fixture-generator

or add

"elisdn/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' => 'elisdn\gii\fixture\Generator',
        ],
    ],
];

And add the following line:

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

in top of your config/web.php file.

About

Fixture class generator for Gii module of Yii2 Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published