PHPackages                             ivqonsanada/laravel-abuse-ip - 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. [Framework](/categories/framework)
4. /
5. ivqonsanada/laravel-abuse-ip

ActiveLibrary[Framework](/categories/framework)

ivqonsanada/laravel-abuse-ip
============================

Fork Repo - Block ip address of all spammer's around the world.

v1.5.1(1y ago)05.9k↓50%MITPHPPHP ^8.0

Since May 7Pushed 1y agoCompare

[ Source](https://github.com/ivqonsanada/Laravel-Abuse-IP)[ Packagist](https://packagist.org/packages/ivqonsanada/laravel-abuse-ip)[ RSS](/packages/ivqonsanada-laravel-abuse-ip/feed)WikiDiscussions main Synced 1mo ago

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

[![Abuse Ip](https://private-user-images.githubusercontent.com/40790503/351979881-ff47c6b4-297f-4984-ae5d-1829b61bd4c6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQzODUzNDMsIm5iZiI6MTc3NDM4NTA0MywicGF0aCI6Ii80MDc5MDUwMy8zNTE5Nzk4ODEtZmY0N2M2YjQtMjk3Zi00OTg0LWFlNWQtMTgyOWI2MWJkNGM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzI0VDIwNDQwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkOWQ5NGQ1YmQ2MzdmMjFhNzYzZTZkZmUzMGM5OGFlOTVlOTFhZjIyMDkxMDIxNmUxZmJjZDA3M2Y5ODYwYjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Fn-XBStuio0yDzou3tu383HJ1qugZHxX6NMtl-3YXw0)](https://private-user-images.githubusercontent.com/40790503/351979881-ff47c6b4-297f-4984-ae5d-1829b61bd4c6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQzODUzNDMsIm5iZiI6MTc3NDM4NTA0MywicGF0aCI6Ii80MDc5MDUwMy8zNTE5Nzk4ODEtZmY0N2M2YjQtMjk3Zi00OTg0LWFlNWQtMTgyOWI2MWJkNGM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzI0VDIwNDQwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkOWQ5NGQ1YmQ2MzdmMjFhNzYzZTZkZmUzMGM5OGFlOTVlOTFhZjIyMDkxMDIxNmUxZmJjZDA3M2Y5ODYwYjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Fn-XBStuio0yDzou3tu383HJ1qugZHxX6NMtl-3YXw0)

Laravel Abuse-IP
================

[](#laravel-abuse-ip)

\##Keep you webiste safe from spammer.

[![Packagist Downloads](https://camo.githubusercontent.com/4d2fa36a9ba3709e86c67344797b0d25ad57b9561879ec2cd2a9106b2bffe639/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726168756c616c616d33312f4c61726176656c2d41627573652d4950)](https://camo.githubusercontent.com/4d2fa36a9ba3709e86c67344797b0d25ad57b9561879ec2cd2a9106b2bffe639/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726168756c616c616d33312f4c61726176656c2d41627573652d4950) [![Packagist Version](https://camo.githubusercontent.com/696b8063758720f930fb7c4a811ac39733deefcf71011160e8a2cdd775ccef3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726168756c616c616d33312f4c61726176656c2d41627573652d4950)](https://camo.githubusercontent.com/696b8063758720f930fb7c4a811ac39733deefcf71011160e8a2cdd775ccef3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726168756c616c616d33312f4c61726176656c2d41627573652d4950) [![License: MIT](https://camo.githubusercontent.com/95b17b8a8a53581ad8706ab0750dae2a0673e122a54d6018ef302bdb1b559f9f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d504c253230322e302d627269676874677265656e2e737667)](https://opensource.org/license/mit) [![Update SPAM IP List](https://github.com/rahulalam31/Laravel-Abuse-IP/actions/workflows/update_spamiplist.yml/badge.svg)](https://github.com/rahulalam31/Laravel-Abuse-IP/actions/workflows/update_spamiplist.yml)

Adds a Security to Laravel for checking whether the IP address is safe or marked as spam to keep you out of worry from spammers and fake data to your website. Uses the AbuseIPDB blocklist from [borestad/blocklist-abuseipdb](https://github.com/borestad/blocklist-abuseipdb) by default.

### Installation

[](#installation)

1. Run the Composer require command to install the package. The service provider is discovered automatically.

    ```
    composer require rahulalam31/laravel-abuse-ip
    ```
2. Publish the configuration file and adapt the configuration as desired:

    ```
    php artisan vendor:publish --tag=laravel-abuse-ip
    ```
3. Run the following artisan command to fetch an up-to-date list of disposable domains:

    ```
    php artisan abuseip:update
    ```

3.1. Add the following to you `.env` file. Add `ABUSEIP_STORAGE_PATH` to change your storage location, Add `ABUSEIP_STORAGE_COMPRESS` `true/false` to enable or disable `ip2long()`

4. (optional) It's highly advised to update the AbuseIp list daily as the spam ip address keeps changing daily, but you can schedule it as per your need regularly. You can either run the command yourself now and then or, if you make use of Laravel's scheduler, you can register the `abuseip:update` command:

    In `routes/console.php`:

    ```
    use Illuminate\Support\Facades\Schedule;
    //
    Schedule::command('abuseip:update')->daily();
    ```

    Or if you use Laravel 10 or below, head over to the Console kernel:

    ```
     protected function schedule(Schedule $schedule)
     {
         $schedule->command('abuseip:update')->daily();
     }
    ```

### Usage

[](#usage)

Use the `middleware::AbuseIp::class` where ever required like in form page or post urls.Or you can add the middleware to your code, For Laravel 10 and below add the middleware `Http/Kernel.php`, For Laravel 11 add to `bootstrap/app/php`

```
//Laravel 10 and below
/*
 * app/Http/Kernel.php
*/

protected $middleware = [
        \RahulAlam31\LaravelAbuseIp\Middleware\AbuseIp::class,
        .....
]
```

```
//Laravel 11
/*
 * bootstrap/app.php
*/
->withMiddleware(function (Middleware $middleware) {
        $middleware->append(\RahulAlam31\LaravelAbuseIp\Middleware\AbuseIp::class);
    })
```

If you don't want to put it in your route middleware you can make a `aliasMiddleware()` and use the alias in your routes file to disable spam ip visits.

```
//Laravel 10 and below
/*
 * app/Http/Kernel.php
*/

protected $routeMiddleware = [
        .....,
        'abuseip' => \RahulAlam31\LaravelAbuseIp\Middleware\AbuseIp::class,

]

Route::get('/xyz', function () {
    //
})->middleware('abuseip');
```

```
//Laravel 11
/*
 * bootstrap/app.php
*/

->withMiddleware(function (Middleware $middleware) {
    //
})
->aliasMiddleware('abuse_ip', \RahulAlam31\LaravelAbuseIp\Middleware\AbuseIp::class)
```

```
// Or use in route file

Route::middleware(AbuseIp::class)->get('/', function () {
            return view('welcome');
        });
```

### Custom fetches

[](#custom-fetches)

By default the package retrieves a new list by using `file_get_contents()`. If you have your own blacklisted Ip List add it to the `source` in `config/abuseip.php`

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance49

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

376d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/376810222cf3a0842cb33781d02fa5ae8c7f910f425bd04a271ffdc92aeb9894?d=identicon)[ivqonsanada](/maintainers/ivqonsanada)

---

Top Contributors

[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (291 commits)")[![rahulalam31](https://avatars.githubusercontent.com/u/40790503?v=4)](https://github.com/rahulalam31 "rahulalam31 (92 commits)")[![onlime](https://avatars.githubusercontent.com/u/2759561?v=4)](https://github.com/onlime "onlime (3 commits)")[![ivqonsanada](https://avatars.githubusercontent.com/u/36329890?v=4)](https://github.com/ivqonsanada "ivqonsanada (2 commits)")

---

Tags

frameworklaravelLaravel Securityspam protectionabuseipdb

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ivqonsanada-laravel-abuse-ip/health.svg)

```
[![Health](https://phpackages.com/badges/ivqonsanada-laravel-abuse-ip/health.svg)](https://phpackages.com/packages/ivqonsanada-laravel-abuse-ip)
```

###  Alternatives

[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[rahulalam31/laravel-abuse-ip

Block ip address of all spammer's around the world.

27431.5k](/packages/rahulalam31-laravel-abuse-ip)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k10.6M274](/packages/laravel-boost)[laravel/lumen-framework

The Laravel Lumen Framework.

1.5k26.2M709](/packages/laravel-lumen-framework)

PHPackages © 2026

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