DB::beginTransaction();
try {DB::table('funds')->insert($data);DB::table('users')->where('id', $uid)->increment('balance', $fee);
} catch (\Exception $e) {DB::rollBack();Log::channel('mysql_error')->info($e);
}
DB::commit();
DB::beginTransaction();
try {DB::table('funds')->insert($data);DB::table('users')->where('id', $uid)->increment('balance', $fee);
} catch (\Exception $e) {DB::rollBack();Log::channel('mysql_error')->info($e);
}
DB::commit();