laravel transaction is not committed. I don’t know where I wrote it wrong
The following is the code
DB::transaction(function () use ($payment,$userBalance) {
Payment::insert($payment);
$userName = $payment['payment_user_name'];
User::where('user_name', $userName)
->increment('user_balance', $userBalance);
});
跪求指教
认证0级讲师