cybercog / laravel-ban

Laravel Ban simplify blocking and banning Eloquent models.
https://komarev.com/sources/laravel-ban
MIT License
1.07k stars 63 forks source link

support to ban by visiter not users #42

Closed badrshs closed 5 years ago

badrshs commented 5 years ago

Hi, Does this package support ban visiter ??? no user here , I want to ban the visiter based on his ip address. So I will have additional table related to the ip address im going to block

thank you for helping :)

antonkomarev commented 5 years ago

Hi @badrshs! This question was raised before: #20 Since Bannable model is polymorphic - IP address model could be banned. Just write your middleware to check for it. It's not an optimal way how to solve IP address bans, but if application is small it's a viable option.

badrshs commented 5 years ago

haaa , good idea , I didnt think about that 😁😁

thanks