PHP code example of crudschool / yii2-migration-generator

1. Go to this page and download the library: Download crudschool/yii2-migration-generator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

crudschool / yii2-migration-generator example snippets

 
 /**
 * @column (name) string|notNull|default('SomeValue')
 */
 

$config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'allowedIPs' => ['127.0.0.1', 'localhost', '::1'],
        'generators' => [
            'migrik'=>[
                        'class'=>\crudschool\migrik\gii\StructureGenerator::class,
                        'templates'=>
                        [
                             'custom'=>'@backend/gii/templates/migrator_schema'
                        ]
            ],
            'migrikdata'=>[
                        'class'=>\crudschool\migrik\gii\DataGenerator::class,
                        'templates'=>
                        [        
                            'custom'=>'@backend/gii/templates/migrator_data'
                        ]
            ],
        ]
]