A Laravel package to throttle requests based on route name
hedii/laravel-throttle-route is a Laravel package for a laravel package to throttle requests based on route name.
It currently has 0 GitHub stars and 61.876 downloads on Packagist (latest version 2.0.0).
Install it with composer require hedii/laravel-throttle-route.
Discover more Laravel packages by hedii
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel package to throttle requests based on route name.
The default Laravel request throttler acts as a global throttler based on user ID or IP. This package allows to have a request limit set by route, by using the route name to resolve the request signature.
Install with composer
composer require hedii/laravel-throttle-route
Add the middleware in your route, and use it as the default Laravel ThrottleRequests middleware.
Don't forget to set a route name.
Route::get('/first', 'FirstController@show')
->middleware(\Hedii\LaravelThrottleRoute\ThrottleRequests::class . ':20,1')
->name('first');
Route::get('/second', 'SecondController@show')
->middleware(\Hedii\LaravelThrottleRoute\ThrottleRequests::class . ':60,1')
->name('second');
composer test
laravel-throttle-route is released under the MIT Licence. See the bundled LICENSE file for details.