Download the PHP package climactic/laravel-spam without Composer

On this page you can find all versions of the php package climactic/laravel-spam. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-spam

Laravel Spam # Laravel Spam A pragmatic anti-spam toolkit for Laravel applications. Block disposable and throwaway email signups, reject known bad actors via StopForumSpam, and configure your own allow/blocklists โ€” with validation rules, middleware, and a check API. [![Discord](https://img.shields.io/discord/303195322514014210?style=for-the-badge)](https://discord.gg/kedWdzwwR5) [![Latest Version on Packagist](https://img.shields.io/packagist/v/climactic/laravel-spam.svg?style=for-the-badge)](https://packagist.org/packages/climactic/laravel-spam) [![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/climactic/laravel-spam/run-tests.yml?branch=main&label=tests&style=for-the-badge)](https://github.com/climactic/laravel-spam/actions?query=workflow%3Arun-tests+branch%3Amain) [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/climactic/laravel-spam/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=for-the-badge)](https://github.com/climactic/laravel-spam/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/climactic/laravel-spam.svg?style=for-the-badge)](https://packagist.org/packages/climactic/laravel-spam) [![Sponsor on GitHub](https://img.shields.io/badge/Sponsor-GitHub-ea4aaa?style=for-the-badge&logo=github)](https://github.com/sponsors/climactic) [![Support on Ko-fi](https://img.shields.io/badge/Support-Ko--fi-FF5E5B?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/ClimacticCo)

๐Ÿ“– Table of Contents

Features

๐ŸŒŸ Sponsors

Your logo here โ€” Become a sponsor and get your logo featured in this README and on our website.

Interested in title sponsorship? Contact us at [email protected] for premium placement and recognition.

๐Ÿ“ฆ Installation

You can install the package via composer:

Optionally publish the config file:

Optionally publish the bundled disposable-email list to local storage (only needed if you plan to refresh it yourself โ€” see below):

โš™๏ธ Configuration

The config file lives at config/spam.php. Every option is documented inline:

Everything is env-driven, so you can tune the package from .env without publishing the config:

No API key required โ€” StopForumSpam lookups are anonymous and this package does not submit reports.

๐Ÿš€ Usage

The Spam::check() API

Get a structured verdict for any email:

SpamReason cases: Clean, InvalidEmail, BlockedDomain, BlockedTld, Disposable, StopForumSpam.

Convenience predicates:

Validation rules

Use Spam::emailRules() in any FormRequest or inline validator. It returns Laravel's standard email rules plus the three spam rules โ€” append your own extras (like unique:) as needed:

Or drop it into an inline validator:

Route middleware

Protect any endpoint that accepts an email field with the spam.email middleware alias. A flagged email yields a standard 422 validation response.

If no parameter is passed, the middleware reads config('spam.default_field') (default: email).

Individual rules

If you want to reach for a specific rule directly:

๐Ÿ”„ Keeping the disposable list fresh

The package ships with a snapshot of disposable/disposable-email-domains. To refresh from upstream on your own schedule, run:

The command writes to config('spam.disposable.storage_path') (default: storage/app/laravel-spam/disposable-domains.json) and clears the cache. Recommended: schedule it monthly:

๐Ÿ“š API Reference

Facade methods

Method Description
Spam::check(string $email): SpamResult Full check; returns {isSpam, reason}
Spam::isSpamEmail(string $email): bool True if any signal fires
Spam::isDisposable(string $email): bool True if the domain is in the disposable list
Spam::isBlockedDomain(string $email): bool True if the domain or TLD is blocklisted
Spam::isStopForumSpam(string $email): bool True if StopForumSpam flags the email
Spam::emailRules(array $extra = []): array Email validation rules; append extras

Validation rules

Rule Class
Blocked domain / TLD Climactic\Spam\Rules\BlockedEmailDomain
Disposable email Climactic\Spam\Rules\DisposableEmail
StopForumSpam lookup Climactic\Spam\Rules\StopForumSpamEmail

Middleware

Alias Class Parameter
spam.email Climactic\Spam\Http\Middleware\BlockSpamEmails Request field (defaults to config)

Console

Command Description
spam:update Refresh the disposable-email list

๐Ÿงช Testing

๐Ÿ“‹ Changelog

Please see CHANGELOG for more information on what has changed recently.

๐Ÿค Contributing

Please see CONTRIBUTING for details. You can also join our Discord server to discuss ideas and get help: Discord Invite.

๐Ÿ”’ Security Vulnerabilities

Please report security vulnerabilities to [email protected].

๐Ÿ’– Support This Project

Laravel Spam is free and open source, built and maintained with care. If this package has saved you development time or helped power your application, please consider supporting its continued development.

Sponsor on GitHub

 

Support on Ko-fi

โญ Star History

Star History Chart

๐Ÿ“ฆ Other Packages

Other open-source Laravel packages from Climactic:

Package Description
climactic/laravel-credits Ledger-based credit system for virtual currencies, reward points, and credit-based features.
climactic/laravel-polar Seamless Polar.sh integration for subscriptions, payments, and webhooks.
climactic/laravel-altcha Drop-in ALTCHA proof-of-work spam protection โ€” privacy-first, self-hosted, no third-party services.

๐Ÿ“„ License

The MIT License (MIT). Please see License File for more information.

โš–๏ธ Disclaimer

This package is not affiliated with Laravel. It's for Laravel but is not by Laravel. Laravel is a trademark of Taylor Otwell. Disposable-domain data is sourced from the disposable/disposable-email-domains community project.


All versions of laravel-spam with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0||^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package climactic/laravel-spam contains the following files

Loading the files please wait ...