Download the PHP package appel/honeypot without Composer
On this page you can find all versions of the php package appel/honeypot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package honeypot
Honeypot: Spam Prevention
A simple spam prevention package for Laravel.
Installation:
Composer
Run this command inside your terminal to add the package into your project.
Publish Config File and Translations
Publish the package config file and translations to your application. Run this command inside your terminal.
Or, you may want to publish the file individually.
Usage
Facade
Add the honeypot hidden input into your form by inserting Honeypot::make(...)
like this:
Helper Function
Blade Directive
Note: If you are using the Blade directive, you may need to run php artisan view:clear
for it to work.
The make()
method will output the following HTML input. (The honeypot_time
field will generate an encrypted timestamp.
After adding the honeypot fields, add the validation rules in your controller for the honeypot and honeytime fields.
Please note that in the honeytime rule, you need to specify the number of seconds it should take for the user to fill out the form. If it takes less time than that, the form will be rejected.
Settings
The honeypots are hidden on the page by using display: hidden
. You can alternatively have them moved off the page by
publishing the config file and changing this setting:
Credits
This project is based on an earlier project by Ian Landsman. The following people contributed to this project: Maksim Surguy, Arjhay Delos Santos
This project is sponsored by Bomshteyn Consulting.
All versions of honeypot with dependencies
illuminate/support Version ^5|^6|^7|^8
illuminate/config Version ^5|^6|^7|^8
illuminate/translation Version ^5|^6|^7|^8