Category: Laravel, Laravel, PHP, PHP, javascript, javascript

· 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
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners