· September 14, 2020 · ⋆ Laravel In the previous versions of Laravel, up to 7.x, when you wanted to rate limit certain routes, you could do it by assigning the throttle middleware to the route or group of routes like so.
As you can tell, the numbers here are hard-coded and there isn’t anything using which you can make this configurations dynamic or re-utilize the same configuration across different routes or route groups.
In a nutshell, Laravel 8 has introduced an Illuminate\Support\Facades\RateLimiter facade using which you can define “named” rate limiters of different configurations.
Follow me on Twitter @amit_merchant New RateLimiter facade for defining named rate limiters in Laravel 8 Class based model factories in Laravel 8 Access application in maintenance mode using a secret token in Laravel 8 Personalized maintenance mode views in Laravel 8 Dynamic blade components in Laravel 8 New RateLimiter facade for defining named rate limiters in Laravel 8 Class based model factories in Laravel 8 Access application in maintenance mode using a secret token in Laravel 8 Personalized maintenance mode views in Laravel 8 Dynamic blade components in Laravel 8