A small Laravel package to help you block IP addresses from accessing your application
nckg/laravel-firewall is a Laravel package for a small laravel package to help you block ip addresses from accessing your application.
It currently has 4 GitHub stars and 569 downloads on Packagist (latest version 0.2.0).
Install it with composer require nckg/laravel-firewall.
Discover more Laravel packages by nckg
or browse all Laravel packages to compare alternatives.
Last updated
Very simple package to allow access to your Laravel application by IP.
You can install the package via composer:
composer require nckg/laravel-firewall
Add the FirewallServiceProvider to you config/app.php file.
// config/app.php
'providers' => [
...
Nckg\Firewall\FirewallServiceProvider::class,
...
]
Publish the configuration file to your configuration path:
php artisan vendor:publish --provider="Nckg\Firewall\FirewallServiceProvider"
If you are using Laravel you can add the middleware to your middleware providers
// app/Http/Kernel.php
/**
* The application's global HTTP middleware stack.
*
* @var array
*/
protected $middleware = [
...
\Nckg\Firewall\Middleware\IpAccess::class,
];
composer test
The MIT License (MIT).