PHPackages                             wnikk/laravel-flexible-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. [Security](/categories/security)
4. /
5. wnikk/laravel-flexible-throttle

ActiveLibrary[Security](/categories/security)

wnikk/laravel-flexible-throttle
===============================

A Laravel middleware for advanced throttle based on IP, session, HTTP status codes, and exceptions. This package provides flexible and customizable protection for your application against brute force, password or scanning abuse and ensures fair use.

00PHP

Since Dec 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wnikk/laravel-flexible-throttle)[ Packagist](https://packagist.org/packages/wnikk/laravel-flexible-throttle)[ RSS](/packages/wnikk-laravel-flexible-throttle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Laravel Flexible Throttle
=========================

[](#laravel-flexible-throttle)

A Laravel middleware for advanced rate limiting based on IP, HTTP status codes, and exceptions. This package provides flexible and configurable rate limiting to protect your application from abuse and ensure fair usage.

Description
-----------

[](#description)

Laravel Flexible Throttle is designed to block intrusive bots that scan all possible addresses or attempt to brute-force passwords and other parameters. By leveraging IP addresses, session IDs, and user IDs, this middleware can effectively limit the number of requests and block malicious activity.

Features
--------

[](#features)

- Rate limiting based on IP address, session ID, or user ID
- Configurable maximum attempts, decay seconds, and block duration
- Customizable rules for specific HTTP status codes and exceptions
- Easy integration with Laravel applications

Installation
------------

[](#installation)

To install the package, use Composer:

```
composer require Wnikk/laravel-flexible-throttle
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="Wnikk\FlexibleThrottle\FlexibleThrottleServiceProvider"
```

And edit the `config/flexible-throttle.php` file to customize the rate limiting.

Usage
-----

[](#usage)

Apply the middleware to your routes:

```
Route::middleware('flexible.throttle')->group(function () {
    Route::get('/example', 'ExampleController@index');
});
```

In this example, the middleware checks if the request has exceeded the maximum number of attempts 403 response. Then, it returns a `429 Too Many Requests` response. Otherwise, it records the request and allows it to proceed.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

---

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

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/0d697f254abf31ac021e96b8b3b716bd32ad5a43187e3bbdc3a9813cf9c0db26?d=identicon)[Nikolya](/maintainers/Nikolya)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/wnikk-laravel-flexible-throttle/health.svg)

```
[![Health](https://phpackages.com/badges/wnikk-laravel-flexible-throttle/health.svg)](https://phpackages.com/packages/wnikk-laravel-flexible-throttle)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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