Yii2 的 Active Record 插入数据库,当这个字段是枚举型的时候,就始终无法入库?
MySQL表中的 return_type (reship,replacement,refund)
但是我
$customer = new Customer();
$customer->return_type = 'reship';
$customer->save();
始终无法插入数据库,怎么回事?
Yii2 的 Active Record 插入数据库,当这个字段是枚举型的时候,就始终无法入库?
MySQL表中的 return_type (reship,replacement,refund)
但是我
$customer = new Customer();
$customer->return_type = 'reship';
$customer->save();
始终无法插入数据库,怎么回事?
var_dump($customer->errors)
检查下是否是验证没通过