更新数据如果出现错误,不用抛出错误提示吗?
// 将订单退款状态改为已申请退款
$order->update([
'refund_status' => Order::REFUND_STATUS_APPLIED,
'extra' => $extra,
]);
return $order;
比如这里,update方法可能会失败赛,不用去判定吗?
推荐文章: