PHP code example of prowebcraft / yii2-double-model

1. Go to this page and download the library: Download prowebcraft/yii2-double-model 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/ */

    

prowebcraft / yii2-double-model example snippets


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

//remove this two lines

//Add this into common/config/main-local.php
    'bootstrap' => 'gii',
    'modules' => [
        'gii' => [
            'class' => 'yii\gii\Module',
            'generators' => [
                'doubleModel' => [
                    'class' => 'prowebcraft\yii2doublemodel\generators\model\Generator',
                    'strictReturnTypes' => true,
                ],
                'kartik-crud' => [
                    'class'     => 'prowebcraft\yii2doublemodel\generators\kcrud\Generator',
                ],
            ],
        ],
    ],

$ php composer.phar