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();