Blacklist or whitelist IP to prevent unauthorized access with Laravel IP Gateway
Laravel IP Gateway is a good package which helps us to blacklist or whitelist IP to prevent unauthorized access.
Since blacklists deny access to specific entities, they are best used when a limited number of items need to be denied access. When most entities need to be denied access, a whitelist approach is more efficient.
Installation
You can install the package via composer:
composer require viitorcloud/laravel-ip-gateway
After installation, You need to publish the config file for this package. This will add the file config/ip-gateway.php, where you can configure this package.
php artisan vendor:publish --provider="LaravelIpGateway\IpGatewayProvider"