Download the PHP package danharrin/livewire-rate-limiting without Composer
On this page you can find all versions of the php package danharrin/livewire-rate-limiting. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download danharrin/livewire-rate-limiting
More information about danharrin/livewire-rate-limiting
Files in danharrin/livewire-rate-limiting
Package livewire-rate-limiting
Short Description Apply rate limiters to Laravel Livewire actions.
License MIT
Homepage https://github.com/danharrin/livewire-rate-limiting
Informations about the package livewire-rate-limiting
This package allows you to apply rate limiters to Laravel Livewire actions. This is useful for throttling login attempts and other brute force attacks, reducing spam, and more.
Installation
You can use Composer to install this package into your application:
This package requires at least Laravel v8.x, when rate limiting improvements were introduced.
This package is tested to support the file
and redis
cache drivers, but not array
.
Usage
Apply the DanHarrin\LivewireRateLimiting\WithRateLimiting
trait to your Livewire component:
In this example, we will set up rate limiting on the submit
action.
The user will only be able to call this action 10 times every minute.
If this limit is exceeded, a TooManyRequestsException
will be thrown. The user is presented with a validation error and instructed how long they have until the limit is lifted:
API Reference
Component Methods
Exceptions
Need Help?
🐞 If you spot a bug with this package, please submit a detailed issue, and wait for assistance.
🤔 If you have a question or feature request, please start a new discussion.
🔐 If you discover a vulnerability within the package, please review our security policy.