composer require ilhamdev/ipwhitelist
protected $routeMiddleware = [
'ipwhitelist' => \ilhamdev\ipwhitelist\middleware\CheckIpMiddleware::class,
];
APP_IP_WHITELIST=127.0.0.1,192.168.1.1
public function __construct()
{
$this->middleware('ipwhitelist');
}