mirror of
https://github.com/v2board/v2board.git
synced 2025-01-10 16:19:10 +08:00
update: ticket save lock
This commit is contained in:
parent
27271e3ffb
commit
f439040375
@ -55,7 +55,7 @@ class TicketController extends Controller
|
||||
public function save(TicketSave $request)
|
||||
{
|
||||
DB::beginTransaction();
|
||||
if ((int)Ticket::where('status', 0)->where('user_id', $request->session()->get('id'))->count()) {
|
||||
if ((int)Ticket::where('status', 0)->where('user_id', $request->session()->get('id'))->lockForUpdate()->count()) {
|
||||
abort(500, __('There are other unresolved tickets'));
|
||||
}
|
||||
$ticket = Ticket::create(array_merge($request->only([
|
||||
|
Loading…
Reference in New Issue
Block a user