Values are not being audited when using DB::beginTransaction #913
Answered
by
parallels999
alexfarrugia
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
parallels999
Feb 19, 2024
Replies: 2 comments
-
i noticed that this was actually happening when i was using update statements with DB::raw - maybe this could be the reason and not the usage of the DB transaction command?
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm using $payment=PaymentModel::query();
$payment->update([
'amount' => DB::raw('amount - allocated_amount'),
]);
// this is not audited because is a bulk update, and it doesn't trigger laravel update event |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
parallels999
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using
DB::beginTransaction
andDB::raw
the same, and everything works as expectedOnly if it a bulk update, in that case it doesn't work