eden-life / superban
The skeleton application for the Laravel framework.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.1
- edenlife/superban: dev-main
- guzzlehttp/guzzle: ^7.2
- laravel/framework: ^10.10
- laravel/sanctum: ^3.3
- laravel/tinker: ^2.8
Requires (Dev)
- fakerphp/faker: ^1.9.1
- laravel/pint: ^1.0
- laravel/sail: ^1.18
- mockery/mockery: ^1.4.4
- nunomaduro/collision: ^7.0
- phpunit/phpunit: ^10.1
- spatie/laravel-ignition: ^2.0
This package is auto-updated.
Last update: 2025-04-19 17:41:08 UTC
README
The Superban Laravel Package provides rate limiting and banning features for API clients based on their behavior. It is designed to be easily integrated into Laravel applications.
Installation
To install the package via composer, run:
composer require edenlife/superban
Configuration
After installation, publish the configuration file:
php artisan vendor:publish --tag=superban-config
This will publish a superban.php file in your config directory.
Usage
Middleware
Apply the Superban middleware to specific routes using the following syntax:
use EdenLife\Superban\Middleware\SuperbanMiddleware; Route::middleware([SuperbanMiddleware::class . ':200,2,1440'])->group(function () { // Your routes here });
Adjust the parameters 200, 2, 1440 based on your desired rate limiting and banning configuration.
Tests
To run the package tests, use bash to run:
./vendor/bin/phpunit
Contributing
Thank you for considering contributing to the Superban package! Feel free to open issues or submit pull requests.
Security
If you discover any security-related issues, please email: anipreciousebuka@gmail.com.