Merge pull request #172 from v2board/dev

#170
This commit is contained in:
tokumeikoi 2020-04-07 01:20:20 +08:00 committed by GitHub
commit 887aad7737
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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([