$res = UserWechat::find()->andFilterWhere(['token' => $token])->one();
$res->save()
如果此处写为
$res = UserWechat::find()->andFilterWhere(['token' => $token])->asArray()->one();
$res->save()
错误,因为asArray()之后, $res就变成了数组, 而数组是没有save()方法的, 该方法只能用类来调用!
$res = UserWechat::find()->andFilterWhere(['token' => $token])->one();
$res->save()
如果此处写为
$res = UserWechat::find()->andFilterWhere(['token' => $token])->asArray()->one();
$res->save()
错误,因为asArray()之后, $res就变成了数组, 而数组是没有save()方法的, 该方法只能用类来调用!