PHP code example of dominus77 / yii2-advanced-start

1. Go to this page and download the library: Download dominus77/yii2-advanced-start 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/ */

    

dominus77 / yii2-advanced-start example snippets


$config = [
    //...
    'components' => [
        'db' => [
            'dsn' => 'mysql:host=localhost;dbname=yii2_advanced_start',
            //...
        ],
        //...
    ],
    //...
];

$config = [
    //...
    'components' => [
        'db' => [
            'dsn' => 'mysql:host=localhost;dbname=yii2_advanced_start_test',
            //...
        ],
        //...
    ],
    //...
];

php init
bash
php yii users/user/create
bash
php yii rbac/roles/assign