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

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

869d 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

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M212](/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.7M112](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M117](/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)
