From a1f2290ff29b0e368fd145353b1b5c371a8633a3 Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Tue, 7 Apr 2020 01:19:52 +0800 Subject: [PATCH] #170 --- app/Http/Controllers/User/TicketController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/User/TicketController.php b/app/Http/Controllers/User/TicketController.php index cc6c8ebc..fae8e057 100644 --- a/app/Http/Controllers/User/TicketController.php +++ b/app/Http/Controllers/User/TicketController.php @@ -51,7 +51,7 @@ class TicketController extends Controller public function save(TicketSave $request) { DB::beginTransaction(); - if ((int)Ticket::where('status', 0)->count()) { + if ((int)Ticket::where('status', 0)->where('user_id', $request->session()->get('id'))->count()) { abort(500, '存在其他工单尚未处理'); } $ticket = Ticket::create(array_merge($request->only([