PHPackages                             kvnc/spammer-shield - 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. kvnc/spammer-shield

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

kvnc/spammer-shield
===================

This package has multiple solutions for the spam form submissions

0.0.12(3y ago)025[4 PRs](https://github.com/BackendDevops/spammer-shield/pulls)MITPHPPHP ^8.0

Since Sep 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/BackendDevops/spammer-shield)[ Packagist](https://packagist.org/packages/kvnc/spammer-shield)[ Docs](https://github.com/kvnc/spammer-shield)[ RSS](/packages/kvnc-spammer-shield/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (18)Used By (0)

Description of Kvc/Spammer-Shield
=================================

[](#description-of-kvcspammer-shield)

[![Latest Version on Packagist](https://camo.githubusercontent.com/605dbb81707205f63a99dd198fc984387096f22f4e4ece0bce4647c9a05f4845/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b766e632f7370616d6d65722d736869656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kvnc/spammer-shield)[![Build](https://github.com/BackendDevops/spammer-shield/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/BackendDevops/spammer-shield/actions/workflows/run-tests.yml)[![PHPStan](https://github.com/BackendDevops/spammer-shield/actions/workflows/phpstan.yml/badge.svg?branch=main)](https://github.com/BackendDevops/spammer-shield/actions/workflows/phpstan.yml)[![Fix PHP code style issues](https://github.com/BackendDevops/spammer-shield/actions/workflows/fix-php-code-style-issues.yml/badge.svg?branch=main&event=push)](https://github.com/BackendDevops/spammer-shield/actions/workflows/fix-php-code-style-issues.yml)[![PHPMD](https://github.com/BackendDevops/spammer-shield/actions/workflows/phpmd.yml/badge.svg?branch=main&event=push)](https://github.com/BackendDevops/spammer-shield/actions/workflows/phpmd.yml)[![Total Downloads](https://camo.githubusercontent.com/b51b6791bb944192962ce6f1dd871de8c0956b90b6db3f265c27c4cfaef824ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b766e632f7370616d6d65722d736869656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kvnc/spammer-shield)

What This Package Does
----------------------

[](#what-this-package-does)

This package has multiple solutions to prevent spam entries on your forms.

- Google Recaptcha integration (enabled by config file),
- Form submission timeout filter , human submission/ bot submission check
- Honeypot input that normal clients can not see on your forms only bots can fill
- Random questions (Human answerable questions randomly changes based on a dictionary)

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

[](#installation)

You can install the package via composer:

```
composer require kvnc/spammer-shield
```

You can publish the config file with:

```
php artisan vendor:publish --tag="spammer-shield-config"
```

You can publish the public assets files with:

```
php artisan asset:publish --bench="spammer-shield"
```

This is the contents of the published config file:

```
return [
    'input_name' => env('SPAMMER_SHIELD_INPUT_NAME', 'specific_values'),
    'input_class' => env('SPAMMER_SHIELD_INPUT_CLASS', 'shield-pot'), //Don't change the class unless you did not add the class in your css
    'form_submission_time' => env('SPAMMER_SHIELD_FORM_TIME', 4), // the time bots can fill up your form in seconds, don't extends this too much
    'is_enabled' => env('SPAMMER_SHIELD_IS_ENABLED', true),
    'is_google_enabled' => env('SPAMMER_SHIELD_IS_ENABLED_CAPTCHA', false),
    'is_random_question_enabled' => env('SPAMMER_SHIELD_IS_ENABLED_RANDOM_QUESTION', true),
    'is_timeout_filter_enabled' => env('SPAMMER_SHIELD_IS_TIMEOUT_FILTER_ENABLED', false),
    'google_recaptcha_site_key' => env('SPAMMER_SHIELD_GOOGLE_SITE_KEY', ''),
    'google_recaptcha_secret_key' => env('SPAMMER_SHIELD_GOOGLE_SECRET_KEY', ''),
    'is_action_taken' => false,

];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="spammer-shield-views"
```

Usage
-----

[](#usage)

```
$variable = new VendorName\Skeleton();
echo $variable->echoPhrase('Hello, VendorName!');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

This package derived from Spatie's laravel package base

- [kvnc](https://github.com/BackendDevops)
- [spatie](https://github.com/spatie)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

[!["Buy Me A Coffee"](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/kvncphp)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.6% 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 ~0 days

Total

12

Last Release

1322d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/17543cf45a43a62074e60c6e044d361ac6dcb090abf30fd64f6bcf68bc89c508?d=identicon)[kvnc](/maintainers/kvnc)

---

Top Contributors

[![BackendDevops](https://avatars.githubusercontent.com/u/2777142?v=4)](https://github.com/BackendDevops "BackendDevops (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

laravelkvncspammer-shieldspam-botsspam-form-submissions

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kvnc-spammer-shield/health.svg)

```
[![Health](https://phpackages.com/badges/kvnc-spammer-shield/health.svg)](https://phpackages.com/packages/kvnc-spammer-shield)
```

###  Alternatives

[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[ziming/laravel-zxcvbn

Zxcvbn Password validation rule for Laravel

3056.7k](/packages/ziming-laravel-zxcvbn)[laravel-validation-rules/phone

Validate that a phone number is in the correct format

69355.5k](/packages/laravel-validation-rules-phone)

PHPackages © 2026

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