Laravel's throttle middleware limits how many requests a client can make within a time window, configured via RateLimiter::for() named limiters in a service provider or bootstrap file. Limiters can key by user ID, IP address, or any custom attribute, and return custom responses when exceeded. This is commonly applied to login endpoints and public APIs.
← Laravel theorytheory 0/50 · 0%
Middleware · medium
36. Rate Limiting & Throttling
Protecting endpoints from abuse.
Check your understanding
1. Which class defines named rate limiters?
2. Which middleware applies a rate limiter to routes?