@raphael_tillman
In Laravel, you can rate limit requests per day by using the built-in rate limiting features provided by Laravel's middleware. Here's how you can set up rate limiting per day in Laravel:
1 2 3 4 5 6 7 8 |
use IlluminateRoutingMiddlewareThrottleRequests; protected $middlewareGroups = [ 'web' => [ // other middleware... 'throttle:100,1440', // 100 requests per day (60 requests per hour * 24 hours) ], ]; |
In the above code snippet, 100
is the maximum number of requests allowed and 1440
is the number of minutes in a day (60 minutes * 24 hours).
1 2 3 4 |
'api' => [ 'throttle:100,1440', // 100 requests per day for API requests 'bindings', ], |
By following these steps, you can easily set up rate limiting per day in your Laravel application to control the number of requests made to your endpoints.