PHPackages                             idoithink2021/think-throttle - 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. idoithink2021/think-throttle

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

idoithink2021/think-throttle
============================

throttle middleware for thinkphp6

v1.2.0(3y ago)05Apache-2.0PHPPHP &gt;=7.1.0

Since Mar 11Pushed 3y agoCompare

[ Source](https://github.com/idoithink2021/think-throttle)[ Packagist](https://packagist.org/packages/idoithink2021/think-throttle)[ RSS](/packages/idoithink2021-think-throttle/feed)WikiDiscussions master Synced 1mo ago

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

### 作用

[](#作用)

通过本中间件可限定用户在一段时间内的访问次数，可用于保护接口防爬防爆破的目的。

### 安装

[](#安装)

```
composer require idoithink2021/think-throttle

```

安装后会自动为项目生成 `conf/throttle.php` 配置文件，安装后组件不会自动启用，需要手动设置。

### 开启

[](#开启)

组件以中间件的方式进行工作，因此它的开启与其他中间件一样，例如在全局中间件中使用 `app/middleware.php` :

```
