Package Data | |
---|---|
Maintainer Username: | aporat |
Maintainer Contact: | aporat28@gmail.com (aporat28) |
Package Create Date: | 2020-08-22 |
Package Last Update: | 2024-11-25 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-18 03:01:11 |
Package Statistics | |
---|---|
Total Downloads: | 218 |
Monthly Downloads: | 19 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Request and actions rate limiter middleware for Laravel and Lumen
The filter-var service provider can be installed via Composer.
composer require aporat/laravel-rate-limiter
To use the RateLimiter service provider, you must register the provider when bootstrapping your application.
The package will automatically register provider and facade.
Add Aporat\RateLimiter\RateLimiterServiceProvider
to the providers
section of your config/app.php
:
'providers' => [
// ...
Aporat\RateLimiter\RateLimiterServiceProvider::class,
];
Add RateLimiter facade to the aliases
section of your config/app.php
:
'aliases' => [
// ...
'RateLimiter' => Aporat\RateLimiter\Facade\RateLimiter::class,
];
Or use the facade class directly:
use Aporat\RateLimiter\Facade\RateLimiter;
Now run php artisan vendor:publish
to publish config/rate-limiter.php
file in your config directory.
Register the Aporat\RateLimiter\RateLimiterServiceProvider
in your bootstrap/app.php
:
$app->register(Aporat\RateLimiter\RateLimiterServiceProvider::class);
Copy the filter-var.php
config file in to your project:
mkdir config
cp vendor/aporat/laravel-rate-limiter/Config/rate-limiter.php config/rate-limiter.php
The MIT License (MIT). Please see License File for more information.