我有订单表,我需要获取Original订单的值以便管理员更改它:
我使用getOriginal和getAttributes()['column_name']总是存储相同的状态值:(
$order->update([
'status' => $request->status
]);
$order->orders_status_reports()->attach($order->id,[
'old_status' => $order->getOriginal('status'),
'new_status' => $order->status,
]);
蝴蝶不菲