PHPackages                             jolimardi/laravel-honeypot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. jolimardi/laravel-honeypot

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

jolimardi/laravel-honeypot
==========================

Laravel form spam protection with honeypot technique

1.1(7mo ago)019MITPHPPHP ^8.2

Since Jun 2Pushed 7mo agoCompare

[ Source](https://github.com/jolimardi/laravel-honeypot)[ Packagist](https://packagist.org/packages/jolimardi/laravel-honeypot)[ Docs](https://github.com/jolimardi/laravel-honeypot)[ RSS](/packages/jolimardi-laravel-honeypot/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

Laravel Honeypot
================

[](#laravel-honeypot)

Laravel Honeypot helps prevent bots from filling forms and creating spam. It uses a 2 inputs protections technique by adding one input that should be empty after form submission (obviously bots will fill it) and one input with the encrypted timestamp of the loading page, that help tracking the delay during loading page and form submission (because bots submit forms quickly). Both inputs are hidden from the users and have randomized names.

 [![Collision logo](docs/banner.jpg)](docs/banner.jpg)

Installation
------------

[](#installation)

You can install the package via composer (the package will automatically register itself) :

```
composer require jolimardi/laravel-honeypot
```

Optionally, you can publish the `config` and `lang` files of the package :

```
php artisan vendor:publish --provider="WebLogin\LaravelHoneypot\ServiceProvider"
```

Usage
-----

[](#usage)

You need to add the Blade component or Blade directive in your form. The only parameter is the name of your fake input (it's a basename the package will add a random suffix). Obviously don't name it `honeypot`.

Blade component :

```

    ...

```

Blade directive :

```

    @honeypot('field-name')
    ...

```

Then uses the `Honeypot` rule like any other `Validation rules` for this same input name, like so :

```
use WebLogin\LaravelHoneypot\Rules\Honeypot;
...

$request->validate([
    'title'      => ['required', 'max:120'],
    'content'    => ['required', 'max:600'],
    'field-name' => [new Honeypot],
]);
```

Configuration
-------------

[](#configuration)

You can change the default configuration by publishing the package `config` (see installation section). It will create a `honeypot.php` file in your config folder.

- `enabled` to enable or not the whole honeypot protection
- `min_seconds` to select the minimum number of seconds to wait before submitting the form

Translation
-----------

[](#translation)

You can translate validation messages by publishing the package `lang` (see installation section) or you can translate it directly in your `lang/your-locale/validation.php` file by adding the needed keys :

```
'honeypot' => [
    'pot'  => "Message when the field that should be empty is filled",
    'time' => "Message when the form is submitted too quickly",
],
```

Credits
-------

[](#credits)

Inspired by the package .

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance62

Regular maintenance activity

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~119 days

Total

5

Last Release

235d ago

Major Versions

0.92 → 1.02024-06-02

PHP version history (3 changes)0.9PHP ^8.0

0.91PHP ^8.3

0.92PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/837198ca814b2f1f46b5d12c199582bb573ece7f5272b636f18b5ecde4340fc4?d=identicon)[JoliMardi](/maintainers/JoliMardi)

---

Top Contributors

[![romaincherot](https://avatars.githubusercontent.com/u/14823758?v=4)](https://github.com/romaincherot "romaincherot (7 commits)")[![Mushr0000m](https://avatars.githubusercontent.com/u/5532323?v=4)](https://github.com/Mushr0000m "Mushr0000m (5 commits)")[![peterpan666](https://avatars.githubusercontent.com/u/4153168?v=4)](https://github.com/peterpan666 "peterpan666 (2 commits)")

---

Tags

laravelvalidationHoneypotlaravel-honeypotform-request

### Embed Badge

![Health badge](/badges/jolimardi-laravel-honeypot/health.svg)

```
[![Health](https://phpackages.com/badges/jolimardi-laravel-honeypot/health.svg)](https://phpackages.com/packages/jolimardi-laravel-honeypot)
```

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M107](/packages/propaganistas-laravel-phone)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
