Don’t use PHP for this. Still fun to do though
PHP
NEW Laravel Package: Spatie Suspicious Login
Povilas walks through our Laravel Suspicious Login package, from email alerts to custom blocking rules, with more details in our blog post and our docs. Read more