delete(); return true; } if (100 < ThumbActionModel::where('uid', $uid)->count()) { throw new AlertException("存储上限", 201); } ThumbActionModel::firstOrCreate([ 'uid' => $uid, 'partner_id' => $partner_id ], [ 'uid' => $uid, 'partner_id' => $partner_id ]); return true; } }