Laravel Throttle using Redis to apply Rate Limit on a Request
Case / Problem
You want to limit a request can made in an x times in y seconds format
Solution
This is an example to limit login attempt for email example@gmail.com that limited to 3 times for every 120 seconds.
use Redis;
...
$requestId = 'login...
dr.codes1 min read