Download the PHP package devlop/honeypot without Composer
On this page you can find all versions of the php package devlop/honeypot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devlop/honeypot
More information about devlop/honeypot
Files in devlop/honeypot
Package honeypot
Short Description Simple honeypot made for Laravel FormRequest
License MIT
Informations about the package honeypot
Honeypot
Simple honeypot made for Laravel FormRequest that detects spam bots via a hidden honeypot field.
Installation
If you wish to change any of the honeypot configuration options (such as the component name) you can publish the config, but this is usually not needed.
Usage
First, add the WithHoneypot
trait to your FormRequest.
Next you need to add the honeypot to your form.
Optionally you can add a message to show when the honeypot 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 honeypot 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 honeypot 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