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 1w 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

13

—

LowBetter than 1% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

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://avatars.githubusercontent.com/u/1561751?v=4)[Nikolay Lagun](/maintainers/Nikolya)[@Nikolya](https://github.com/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

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

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