PHPackages                             devarjhay/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. [Security](/categories/security)
4. /
5. devarjhay/honeypot

ActiveLibrary[Security](/categories/security)

devarjhay/honeypot
==================

A simple spam protection for Laravel 5.4 and 5.5.

v1.1.0(8y ago)52.8k3[1 PRs](https://github.com/devarjhay/honeypot/pulls)MITPHPPHP &gt;=5.6.4

Since Aug 23Pushed 5y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (5)Versions (6)Used By (0)

Honeypot: Spam Prevention
=========================

[](#honeypot-spam-prevention)

A simple spam prevention package for Laravel 5.4 and 5.5.

Installation:
=============

[](#installation)

### Composer

[](#composer)

Run this command inside your terminal to add the package into your project.

```
composer require devarjhay/honeypot

```

Configuration
=============

[](#configuration)

### Register the Honeypot Service Provider (Laravel 5.4 only)

[](#register-the-honeypot-service-provider-laravel-54-only)

Add the package to your application service providers in `config/app.php` file.

```
'providers' => [

  /*
   * Laravel Framework Service Providers...
   */
   Illuminate\Translation\TranslationServiceProvider::class,
   Illuminate\Validation\ValidationServiceProvider::class,
   Illuminate\View\ViewServiceProvider::class,
   ...

   /*
    * Package Service Providers...
    */
   DevArjhay\Honeypot\Providers\HoneypotServiceProvider::class,
],
```

### Publish Config File and Translations

[](#publish-config-file-and-translations)

Optimize the application

```
php artisan optimize

```

Publish the package config file and translations to your application. Run this command inside your terminal.

```
php artisan vendor:publish --provider="DevArjhay\Honeypot\Providers\HoneypotServiceProvider"

```

Or, you may want to publish the file individually.

```
php artisan vendor:publish --provider="DevArjhay\Honeypot\Providers\HoneypotServiceProvider" --tag="config"
php artisan vendor:publish --provider="DevArjhay\Honeypot\Providers\HoneypotServiceProvider" --tag="lang"

```

Usage
=====

[](#usage)

### Using Facades

[](#using-facades)

Add the honeypot hidden input into your form by inserting `Honeypot::make(...)` like this:

```

    {!! Honeypot::make('honeypot_name', 'honeypot_time') !!}

```

### Using Helpers

[](#using-helpers)

```

    {!! honeypot('honeypot_name', 'honeypot_time') !!}

```

### Using Blade Templates

[](#using-blade-templates)

```

    @honeypot('honeypot_name', 'honeypot_time')

```

The `make` method will output the following HTML input. (The `honeypot_time` field will generate an encrypted tmestamps.

```

```

After adding the honeypot fields. Add the validation rules for the honeypot and honey time fields.

```
$this->validate($request, [
    ...
    'honeypot_name' => 'honeypot',
    'honeypot_time' => 'required|honeytime:5'
]);
```

Please note that you need to specify the number of seconds in honeytime. It should take for the user to fill up the form. If it takes less time than that the form is considered as a spam submission.

I hope you enjoy getting a less spam when user submitting a form.

Credits
=======

[](#credits)

This project was based on  – Maksim Surguy
Original work on  – Ian Landsman

License
=======

[](#license)

MIT License

Copyright (c) 2017 Arjhay Delos Santos

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~49 days

Total

5

Last Release

2985d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/214e314e173adfcab9c838421ae5d621060ca9bbe2334dc9d06422bc33f0a08e?d=identicon)[devarjhay](/maintainers/devarjhay)

---

Top Contributors

[![devarjhay](https://avatars.githubusercontent.com/u/12896698?v=4)](https://github.com/devarjhay "devarjhay (6 commits)")[![codewithmei](https://avatars.githubusercontent.com/u/128881536?v=4)](https://github.com/codewithmei "codewithmei (5 commits)")[![avrahamappel](https://avatars.githubusercontent.com/u/33736292?v=4)](https://github.com/avrahamappel "avrahamappel (2 commits)")

---

Tags

honeypotlaravelphpphp-libraryspam-preventionlaravelspamFormsHoneypotdevarjhayhoneytime

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[msurguy/honeypot

Honeypot spam prevention

4381.2M12](/packages/msurguy-honeypot)[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[laragear/poke

Keep your forms alive, avoid TokenMismatchException by gently poking your Laravel app

2211.5k](/packages/laragear-poke)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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