Tokumeikoi 5 năm trước cách đây
mục cha
commit
7c69e19304
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      app/Http/Controllers/User/TicketController.php

+ 3 - 0
app/Http/Controllers/User/TicketController.php

@@ -51,6 +51,9 @@ class TicketController extends Controller
     public function save(TicketSave $request)
     {
         DB::beginTransaction();
+        if ((int)Ticket::where('status', 0)->count()) {
+            abort(500, '存在其他工单尚未处理');
+        }
         $ticket = Ticket::create(array_merge($request->only([
             'subject',
             'level'