PHP code example of liujx / yii2-app-advanced

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

    

liujx / yii2-app-advanced example snippets


namespace backend\controllers;

/**
 * Class ChinaController
 * @package backend\controllers
 */
class ChinaController extends Controller 
{
    /**
     * @var string 定义使用的model
     */
    protected $modelClass = '\common\models\China';
}

    php composer.phar global 

php composer create-project liujx/yii2-app-advanced
bash
php init

    php yii migrate --migrationPath=@yii/rbac/migrations
    

    php yii migrate --migrationPath=@jinxing/admin/migrations
    

     php yii migrate