From b1ab5e463b988b78d75e9521ed1ed77a5b3e2ca8 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 23 Oct 2019 00:10:46 +0800 Subject: [PATCH] update --- app/Http/Controllers/InviteController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/InviteController.php b/app/Http/Controllers/InviteController.php index c03b4190..c5906e0e 100644 --- a/app/Http/Controllers/InviteController.php +++ b/app/Http/Controllers/InviteController.php @@ -12,7 +12,7 @@ use App\Utils\Helper; class InviteController extends Controller { public function save (Request $request) { - if (InviteCode::where('user_id', $request->session()->get('id'))->count() >= 5) { + if (InviteCode::where('user_id', $request->session()->get('id'))->where('status', 0)->count() >= 5) { abort(500, '已达到创建数量上限'); } $inviteCode = new InviteCode();