yii2得到的数据对象转化成数组需要用到asArray().
1.Customer::find(['id' => $id])->asArray()->one();
2.
$model = Customer::findModel($id);
$model->attributes;
yii2得到的数据对象转化成数组需要用到asArray().
1.Customer::find(['id' => $id])->asArray()->one();
2.
$model = Customer::findModel($id);
$model->attributes;