PHPackages                             zeevx/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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. zeevx/superban

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

zeevx/superban
==============

Add the ability to ban a client completely from accessing your app routes for a period of time.

1.0.1(2y ago)37MITPHPPHP ^8.1

Since Dec 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/zeevx/superban)[ Packagist](https://packagist.org/packages/zeevx/superban)[ Docs](https://github.com/zeevx/superban)[ RSS](/packages/zeevx-superban/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (12)Versions (3)Used By (0)

[![superban](https://camo.githubusercontent.com/57529d57d3a9a6012b7c9ff9668dc3cb8ab279ffccfc3836d680ef37dcbbab6d/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f537570657262616e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d7a65657678253246737570657262616e267061747465726e3d63616765267374796c653d7374796c655f31266465736372697074696f6e3d4164642b7468652b6162696c6974792b746f2b62616e2b612b636c69656e742b636f6d706c6574656c792b66726f6d2b616363657373696e672b796f75722b6170702b726f757465732b666f722b612b706572696f642b6f662b74696d652e266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667267769647468733d31303026686569676874733d313030)](https://camo.githubusercontent.com/57529d57d3a9a6012b7c9ff9668dc3cb8ab279ffccfc3836d680ef37dcbbab6d/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f537570657262616e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d7a65657678253246737570657262616e267061747465726e3d63616765267374796c653d7374796c655f31266465736372697074696f6e3d4164642b7468652b6162696c6974792b746f2b62616e2b612b636c69656e742b636f6d706c6574656c792b66726f6d2b616363657373696e672b796f75722b6170702b726f757465732b666f722b612b706572696f642b6f662b74696d652e266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667267769647468733d31303026686569676874733d313030)

Laravel Superban .
------------------

[](#laravel-superban-)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5168ae8b4dea45f9298078ed1a25f56e7e1771695c9e794c827870b7c44537a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a656576782f737570657262616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zeevx/superban)[![Total Downloads](https://camo.githubusercontent.com/d8d0bc4759b43a75ce2a5d3b2ca45e9b1c6501c59a758675e752272e7a792a88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a656576782f737570657262616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zeevx/superban)

Add the ability to ban a client completely from accessing your app routes for a period of time.

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

[](#installation)

You can install the package via composer:

```
composer require zeevx/superban
```

You can publish the config file with:

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

To use middleware add them inside your app/Http/Kernel.php :

```
    protected $routeMiddleware = [
        'superban' => \Zeevx\Superban\Middlewares\SuperbanMiddleware::class,
    ];
```

This is the contents of the published config file:

```
return [
/**
     * Key used in cache
     * The default is ip_address, you can use either: ip_address or email or user_id
     *
     */
    'key' => 'ip_address',

    /**
     * The cache to be used,
     * The default cache in config/cache.php is used if empty.
     */
    'cache' => 'file',

    /**
     * Specify guard to be used if you are using email or user_id
     * The default guard in config/auth.php is used if empty
     */
    'user_guard' => '',

    /**
     * Enable email notification for when a user is banned
     *
     */
    'enable_email_notification' => true,

    /**
     * Email address to be used for email notification
     *
     */
    'email_address' => '',
];
```

Usage
-----

[](#usage)

Apply the middleware to any route in this format:

X - Number of request

Y - Within what period (in minutes)

Z- How long the user should be banned (in minutes).

```
Route::middleware(['superban:X,Y,Z])->group(function () {
   Route::post('/thisroute', function () {
       // ...
   });

   Route::post('anotherroute', function () {
       // ...
   });
});
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Paul Adams](https://github.com/zeevx)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~0 days

Total

2

Last Release

924d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/89e891f62dbee3c7f6979348f5e75af5b72267a9160456918e63f80092281ff4?d=identicon)[zeevx](/maintainers/zeevx)

---

Top Contributors

[![zeevx](https://avatars.githubusercontent.com/u/44035730?v=4)](https://github.com/zeevx "zeevx (8 commits)")

---

Tags

laravelSuperbanPaul Adams

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.3k3](/packages/defstudio-telegraph)

PHPackages © 2026

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