nckg / laravel-firewall
A small Laravel package to help you block IP addresses from accessing your application
0.2.0
2021-06-08 12:54 UTC
Requires
- php: ^7.4|^8.0
Requires (Dev)
- illuminate/support: ^8.4.4
- mockery/mockery: ^1.4
- orchestra/testbench: ^6.18.0
- phpunit/phpunit: ^9.5.4
README
Introduction
Very simple package to allow access to your Laravel application by IP.
Installation
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, ];
Testing
composer test
License
The MIT License (MIT).