Open sourceLaravel package
Laravel Spam
Laravel Spam is an open-source anti-spam toolkit for Laravel by Climactic. It checks a signup email against a list of disposable email domains, your own blocklists and StopForumSpam, with no database tables and no API keys.
Install
composer require climactic/laravel-spam- Type
- Laravel package
- Requires
- PHP 8.2 or later, Laravel 11, 12 or 13
- License
- MIT
- Maintained by
- Climactic
What it does
- Disposable email blocking
- A bundled list of more than 70,000 disposable email domains, refreshed with one artisan command.
- StopForumSpam lookups
- Cached lookups that fail open, so an outage never blocks a real signup.
- Your own blocklists
- Block domains and top-level domains that you choose in the config.
- Validation rules and middleware
- Use Spam::emailRules() in a form request or the spam.email middleware on a route.
- A reason for every block
- Spam::check() returns a typed reason, so you can log or show why an address was refused.
- Nothing to set up
- No database tables and no API keys.
Example
Add spam checks to an email validation rule.
use Climactic\Spam\Facades\Spam;
public function rules(): array
{
return [
'email' => Spam::emailRules([
'unique:'.User::class,
]),
];
}- The package checks email addresses, not the content of messages. It is pre-1.0.
- The disposable domain data comes from the community project disposable/disposable-email-domains.
- This package is not affiliated with Laravel. Laravel is a trademark of Taylor Otwell.
Questions about Laravel Spam
What is Laravel Spam?
Laravel Spam is an open-source anti-spam toolkit for Laravel by Climactic. It checks a signup email against a list of disposable email domains, your own blocklists and StopForumSpam, with no database tables and no API keys.
How do I install Laravel Spam?
Run "composer require climactic/laravel-spam". It needs PHP 8.2 or later, Laravel 11, 12 or 13.
Is Laravel Spam free to use?
Yes. Laravel Spam is open source under the MIT license, and the source code is on GitHub at github.com/Climactic/laravel-spam.
Who maintains Laravel Spam?
Climactic, a venture studio that builds and operates its own software products, maintains Laravel Spam.
More open source from Climactic
- laravel-credits A ledger-based Laravel package for managing credit-based systems in your application. Runs in Markdown Anything and ColorBuk
- veer Inertia.js server adapter for Rust. Return typed props from axum handlers and render React, Vue or Svelte pages.
- laravel-altcha Drop-in Laravel integration for ALTCHA, a privacy-friendly, self-hosted alternative to CAPTCHA.
- laravel-polar Laravel SDK for Polar.sh. Adds subscriptions, one-time payments, and license keys to a Laravel app. Runs in Markdown Anything and ColorBuk
- pixelserve Self-hosted image proxy and transformer. Resize, crop, and reformat images on demand, and generate Open Graph images. Runs in Markdown Anything and ColorBuk