PHPackages                             weblogin/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. weblogin/laravel-honeypot

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

weblogin/laravel-honeypot
=========================

Laravel form spam protection with honeypot technique

v1.0.2(12mo ago)51.5k↑55.6%1MITPHPPHP ^7.4|^8.0

Since Nov 7Pushed 12mo ago2 watchersCompare

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

READMEChangelogDependencies (5)Versions (4)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 weblogin/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

38

—

LowBetter than 85% of packages

Maintenance50

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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 ~460 days

Total

3

Last Release

363d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca2f5a6794385617414f1891c265b5bffe39ab8920995afd6c028d7c16f474b3?d=identicon)[WebLogin](/maintainers/WebLogin)

---

Top Contributors

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

---

Tags

honeypotlaravelvalidationlaravelvalidationHoneypotlaravel-honeypotform-requestweblogin

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/weblogin-laravel-honeypot/health.svg)](https://phpackages.com/packages/weblogin-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)
