PHPackages                             nsp-team/webman-throttler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nsp-team/webman-throttler

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nsp-team/webman-throttler
=========================

very Very easy to use a current limiting component, the code is very simple, based on the webman framework.

v1.0.1(4y ago)168751[4 issues](https://github.com/nsp-team/webman-throttler/issues)MITPHPPHP &gt;=7.2

Since Mar 30Pushed 4y agoCompare

[ Source](https://github.com/nsp-team/webman-throttler)[ Packagist](https://packagist.org/packages/nsp-team/webman-throttler)[ RSS](/packages/nsp-team-webman-throttler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

webman-throttler
================

[](#webman-throttler)

限流类（Throttler)提供了一种非常简单的方法，可以将用户要执行的活动限制为在设定的时间段内只能进行一定次数的尝试。这最常用于对 API 进行速率限制，或限制用户针对表单进行的尝试次数，以帮助防止暴力攻击。 该类可用于你根据设置的时间来进行限制的操作。

限流类

- 全局中间件，整个应用接口限流，
- 路由中间件，某些功能接口请求速率限制

缓存依据的是`Support\Cache的 instance()`, 其他类只要是实现 `get($key, $default = null)`, `set($key, $value, $ttl = null)`, `delete($key)` funtion就行.

> 项目地址：

安装
--

[](#安装)

`composer require nsp-team/webman-throttler`

基本用法
----

[](#基本用法)

> 默认 开启全局中间件限流

```
return [
    '' => [
        \NspTeam\WebmanThrottler\Middleware\ThrottlerMiddleware::class,
    ]
];
```

> 你也可以启用路由中间件，控制接口请求速率限制 例如：

```
Route::group('/sys/user', static function () {
    Route::post('/test', [User::class, 'test']);
})->middleware([
    \NspTeam\WebmanThrottler\Middleware\ThrottlerMiddleware::class
]);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

2

Last Release

1497d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9755903f7a6e3183dc76df22ec6c1db85fc54724e85c6e4351efbfd563bc07a?d=identicon)[19951591761](/maintainers/19951591761)

---

Top Contributors

[![Maoxp](https://avatars.githubusercontent.com/u/37761489?v=4)](https://github.com/Maoxp "Maoxp (4 commits)")

### Embed Badge

![Health badge](/badges/nsp-team-webman-throttler/health.svg)

```
[![Health](https://phpackages.com/badges/nsp-team-webman-throttler/health.svg)](https://phpackages.com/packages/nsp-team-webman-throttler)
```

###  Alternatives

[tinywan/exception-handler

webman exception handler plugin

1610.1k2](/packages/tinywan-exception-handler)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
