Download the PHP package rahulalam31/laravel-abuse-ip without Composer
On this page you can find all versions of the php package rahulalam31/laravel-abuse-ip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rahulalam31/laravel-abuse-ip
More information about rahulalam31/laravel-abuse-ip
Files in rahulalam31/laravel-abuse-ip
Package laravel-abuse-ip
Short Description Block ip address of all spammer's around the world.
License MIT
Informations about the package laravel-abuse-ip
Laravel Abuse-IP
Keep you webiste safe from spammer.
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 by default.
Installation
-
Run the Composer require command to install the package. The service provider is discovered automatically.
-
Publish the configuration file and adapt the configuration as desired:
- Run the following artisan command to fetch an up-to-date list of disposable domains:
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()
-
(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
:Or if you use Laravel 10 or below, head over to the Console kernel:
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
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.
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
All versions of laravel-abuse-ip with dependencies
ext-json Version *
illuminate/cache Version ^8.0|^9.0|^10.0|^11.0
illuminate/config Version ^8.0|^9.0|^10.0|^11.0
illuminate/contracts Version ^8.0|^9.0|^10.0|^11.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0
illuminate/console Version ^8.0|^9.0|^10.0|^11.0
illuminate/validation Version ^8.0|^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^7.0|^7.9