Download the PHP package devlop/speedtrap without Composer
On this page you can find all versions of the php package devlop/speedtrap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devlop/speedtrap
More information about devlop/speedtrap
Files in devlop/speedtrap
Package speedtrap
Short Description Simple speedtrap honeypot made for Laravel FormRequest
License MIT
Informations about the package speedtrap
Speedtrap
Simple speedtrap honeypot made for Laravel FormRequest that detects spam bots by measuring the time it took to submit the form.
Installation
If you wish to change any of the speedtrap configuration options (such as the default threshold of 5 seconds or component name) you can publish the config, but this is usually not needed.
Usage
First, add the WithSpeedtrap
trait to your FormRequest.
Next you need to add the speedtrap to your form.
Optionally you can add a message to show when the speedtrap was triggered, this only works when using automatic validation.
Lastly, you need to configure the validation, it can either be automatic or manual.
Automatic validation
Add the speedtrap rules to your rules configuration, this will make it redirect back to the form when triggered, as any other form validation error.
Optionally you can also register the rules like this
Manual validation
If you are doing the validation manually you have more control of how you handle spammers, maybe you want to silently ignore it and give the spammer the impression of success? it's all up to you.
All versions of speedtrap with dependencies
laravel/framework Version ^7.0|^8.0
illuminate/collections Version ^7.0|^8.0
illuminate/container Version ^7.0|^8.0
illuminate/support Version ^7.0|^8.0