PHPackages                             yufunny/laravel-cat - 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. yufunny/laravel-cat

ActiveLibrary

yufunny/laravel-cat
===================

concurrency and throttle for laravel/lumen

19PHPCI failing

Since Nov 10Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

### Laravel-Cat

[](#laravel-cat)

Control concurrency and throttle for laravel.

laravel路由并发/限流控制

### 用法

[](#用法)

1. 添加ServiceProvider

    - laravel:在config/app.php 中的providers添加：Yufunny\\LaravelCat\\CatServiceProvider::class
    - lumen:在bootstrap/app.php 中添加： $app-&gt;register(Yufunny\\LaravelCat\\CatServiceProvider::class);
2. 路由中使用

- 限流

```
    $router->group(['middleware' => 'cat.t:uid-ip%60%5'], function () use ($router) {
        $router->get('foo', function() {
            return 'hello';
        });
    });
```

表示同一个ip、uid在60秒内最大请求5次

- 并发

```
    $router->group(['middleware' => 'cat.c:uid%ip'], function () use ($router) {
        $router->get('bar', function() {
            return 'hello';
        });
    });
```

表示同一个ip、uid不能并发请求

### 说明

[](#说明)

- 限流中间件：cat.t,参数格式为param1-param2%duration%max。表示请求参数中有param1、param2时，相同的参数值在一段时间内（单位秒）请求次数不能超过max次。
- 并发中间件：cat.c,参数格式为param1%param2%param3,表示param1，param2，param3相同的参数值不能并发请求。

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2776d3d84f637399d61ea4e35ddac00d888d924dce1b6a7a72b6033070413f8d?d=identicon)[mxy@yufu.fun](/maintainers/mxy@yufu.fun)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/yufunny-laravel-cat/health.svg)

```
[![Health](https://phpackages.com/badges/yufunny-laravel-cat/health.svg)](https://phpackages.com/packages/yufunny-laravel-cat)
```

PHPackages © 2026

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