PHP code example of kriss / yii2-advanced

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

    

kriss / yii2-advanced example snippets

bash
# 安装依赖
composer install
yarn
# 初始化环境(dev)
php init
# 数据库迁移
php yii migrate
# 数据初始化
php yii init/init-data
# 权限初始化
php yii init-auth/restore
# 启动 php
composer serve
# 启动 vue
yarn serve
bash
# 安装依赖
composer install --no-dev
yarn
# 初始化环境(prod)
php init
# 数据库迁移
php yii migrate
# 数据初始化
php yii init/init-data
# 权限初始化
php yii init-auth/restore
# 配置 nginx 访问 php
# 编译前端
yarn build
bash
php init --env=dev --overwrite=all
# modify .env and docker-compose.yml
docker-compose up
docker-compose exec app composer install -vvv
docker-compose exec app php yii migrate
docker-compose exec app php yii init/init-data
docker-compose exec app php yii init-auth/restore
docker-compose exec app bash