PHPackages                             segun/superban - 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. segun/superban

ActiveLibrary[Security](/categories/security)

segun/superban
==============

The package provides a middleware for rate limiting and banning suspicious users

1.0.0(2y ago)02PHP

Since Dec 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/SegunCodes/superban-package)[ Packagist](https://packagist.org/packages/segun/superban)[ RSS](/packages/segun-superban/feed)WikiDiscussions master Synced 4w ago

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

Segun Laravel Superban Package
==============================

[](#segun-laravel-superban-package)

Introduction
------------

[](#introduction)

The Laravel Superban package provides a middleware for rate limiting and banning clients based on specified criteria. It allows you to easily configure rate limits, ban durations, and apply these restrictions to specific or all routes in your Laravel application.

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

[](#installation)

Install the package via Composer:

```
composer require segun/superban
```

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

[](#configuration)

Publish the configuration file to customize your settings

```
php artisan vendor:publish --tag=superban-config
```

The configuration file will be located at `config/superban.php`.

Configuration Options
---------------------

[](#configuration-options)

cache\_driver: Specify the cache driver for rate limiting and banning (e.g redis, database). ban\_criteria: Define criteria for banning clients (e.g user\_id, ip\_address, email).

Usage
-----

[](#usage)

Apply the superban middleware to your routes or route groups:

```
use Superban\Middleware\SuperbanMiddleware;

Route::middleware(['superban:200,2,1440'])->group(function () {
    Route::post('/thisroute', function () {
        // Your route logic here
    });

    Route::post('/anotherroute', function () {
        // Your route logic here
    });
});
```

In this example:

200 is the number of requests allowed. 2 is the time window in minutes for the specified number of requests. 1440 is the ban duration in minutes.

Running tests
-------------

[](#running-tests)

To run a test, the command `composer test` is run

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

959d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48e055148e3b3caf741b22179aaf227c40a91f6f8790a968f4ffe4b441daa1f6?d=identicon)[SegunCodes](/maintainers/SegunCodes)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/segun-superban/health.svg)

```
[![Health](https://phpackages.com/badges/segun-superban/health.svg)](https://phpackages.com/packages/segun-superban)
```

###  Alternatives

[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k42](/packages/paragonie-ecc)[sansec/magento2-module-shield

15218.6k](/packages/sansec-magento2-module-shield)[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)
