| Package Data | |
|---|---|
| Maintainer Username: | mxy@yufu.fun |
| Maintainer Contact: | mxy@yufu.fun (yufu) |
| Package Create Date: | 2019-05-12 |
| Package Last Update: | 2019-11-10 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-03 15:18:15 |
| Package Statistics | |
|---|---|
| Total Downloads: | 9 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 1 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Control concurrency and throttle for laravel.
laravel路由并发/限流控制
添加ServiceProvider
路由中使用
$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不能并发请求