class SiteController extends Controller{

    public $enableCsrfValidation = false; //在不需要csrf验证的控制器中加入此行代码即可

    public function actionIndex(){
        // CSRF validation will not be applied to this and other actions
    }
}
我 秦始皇 打钱