antonioribeiro / firewall

Firewall package for Laravel applications
BSD 3-Clause "New" or "Revised" License
1.39k stars 164 forks source link

How to add ipaddress to the database firewall table? #120

Closed githubgobi closed 6 years ago

githubgobi commented 6 years ago

How to add ipaddress to the firewall table?how to update whitelisted&blocklisted?

FatemeBordbar commented 6 years ago

in laravel and add to blacklist :

$ip = Input::get('ip'); $valid = filter_var($ip, FILTER_VALIDATE_IP);

$firewall = app()->make('firewall'); $return = $firewall->blacklist($valid);

githubgobi commented 6 years ago

thank You @fatemejon

But have to add ip address to database use

$ip = Input::get('ip'); $valid = filter_var($ip, FILTER_VALIDATE_IP);

$firewall = app()->make('firewall'); $firewall->whitelist($ip);