liugun
composer global require "fxp/composer-asset-plugin:1.0.0-beta3"
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
The first command installs the composer asset plugin which allows managing bower and npm package dependencies through Composer. You only need to run this command once for all.
摘自:http://www.yiiframework.com/doc-2.0/guide-start-installation.html
- liugun 回答了问题 怎样判断save的数据是否为一条新数据
afterSave()中isNewRecord应该没失效吧