PHPackages                             breadthe/laravel-silent-spam-filter - 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. breadthe/laravel-silent-spam-filter

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

breadthe/laravel-silent-spam-filter
===================================

Silently filter spam messages based on a custom keyword/keyphrase blacklist.

1.2.0(5y ago)92.5k↓91.7%3MITPHPPHP ^7.2.5|^8.0CI failing

Since May 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/breadthe/laravel-silent-spam-filter)[ Packagist](https://packagist.org/packages/breadthe/laravel-silent-spam-filter)[ Docs](https://github.com/breadthe/laravel-silent-spam-filter)[ RSS](/packages/breadthe-laravel-silent-spam-filter/feed)WikiDiscussions master Synced yesterday

READMEChangelog (7)Dependencies (3)Versions (8)Used By (0)

Laravel Silent Spam Filter
==========================

[](#laravel-silent-spam-filter)

[![license](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![packagist](https://camo.githubusercontent.com/ddd791146c28e078ce47742bc4a55d601f550008455de802157fdbb5fe37b701/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62726561647468652f6c61726176656c2d73696c656e742d7370616d2d66696c7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/breadthe/laravel-silent-spam-filter)[![build](https://camo.githubusercontent.com/db961e27650d29a86570f9b60d9566f530822e0409c17e63d59b94162f35a981/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f62726561647468652f6c61726176656c2d73696c656e742d7370616d2d66696c7465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/breadthe/laravel-silent-spam-filter)[![code quality](https://camo.githubusercontent.com/c9338f99632d1a72bb4681dd46b48d3e5d8acd5abb57599c0a6ff5f52904983b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f62726561647468652f6c61726176656c2d73696c656e742d7370616d2d66696c7465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/breadthe/laravel-silent-spam-filter)[![downloads](https://camo.githubusercontent.com/5a3d7f02e2460a11d9ff7a336fad67574f03d28efc2447c2786fa025716dde28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62726561647468652f6c61726176656c2d73696c656e742d7370616d2d66696c7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/breadthe/laravel-silent-spam-filter)

A simple way to filter a message for spam in a Laravel project, based on your own custom keyword and phrase blacklist. It is useful in silently ignoring messages submitted via contact forms, without alerting the spammer that the message went through.

By default it comes with virtually zero configuration, which means you'll have to add your own keywords and phrases to the blacklist.

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

[](#installation)

You can install the package via composer:

```
composer require breadthe/laravel-silent-spam-filter
```

Optionally publish the configuration file `config/silentspam.php`:

```
php artisan vendor:publish --provider="Breadthe\SilentSpam\SilentSpamServiceProvider" --tag="silentspam-config"
```

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

[](#configuration)

If you published the configuration file `config/silentspam.php` you can add additional entries to the `blacklist` key, or overwrite the sample entries.

At runtime you can use `SilentSpam::blacklist([])` to add additional keywords, that will get merged with the list in the configuration. This can be useful if you want to keep a global blacklist in the config, but also add custom lists depending on the context when checking for spam.

Usage
-----

[](#usage)

```
$spamMessage = 'This message contains spam';
$normalMessage = 'This is a normal message';

SilentSpam::blacklist([
    'contains spam',
]);

SilentSpam::isSpam($spamMessage); // true
SilentSpam::notSpam($spamMessage); // false

SilentSpam::isSpam($spamMessage); // false
SilentSpam::notSpam($spamMessage); // true
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Omigosh Dev](https://github.com/breadthe)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~107 days

Recently: every ~133 days

Total

7

Last Release

1957d ago

PHP version history (4 changes)1.0.0PHP ^7.1

1.0.2PHP ^7.1|^7.2

1.0.3PHP ^7.1|^7.2|^7.3|^7.4

1.2.0PHP ^7.2.5|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/555692bc62844933d570637ec8f699ec25755e0d2b101dc0eee8370f66bc9916?d=identicon)[breadthe](/maintainers/breadthe)

---

Top Contributors

[![breadthe](https://avatars.githubusercontent.com/u/17433578?v=4)](https://github.com/breadthe "breadthe (17 commits)")

---

Tags

laravelspam-filteringbreadthelaravel-silent-spam-filter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/breadthe-laravel-silent-spam-filter/health.svg)

```
[![Health](https://phpackages.com/badges/breadthe-laravel-silent-spam-filter/health.svg)](https://phpackages.com/packages/breadthe-laravel-silent-spam-filter)
```

###  Alternatives

[illuminate/validation

The Illuminate Validation package.

18838.2M1.7k](/packages/illuminate-validation)[sandermuller/laravel-fluent-validation

Fluent validation rule builders for Laravel

20719.0k4](/packages/sandermuller-laravel-fluent-validation)

PHPackages © 2026

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