Search by

roundly-consulting / campaigns-for-laravel

mihaliak

Send campaigns to multiple recipients

Package info

github.com/roundly-consulting/campaigns-for-laravel

pkg:composer/roundly-consulting/campaigns-for-laravel

Fund package maintenance!

Patreon

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-10-03 18:39 UTC

This package is auto-updated.

Last update: 2026-10-03 18:53:32 UTC


README

Campaigns for Laravel — Roundly open source

Latest release Tests Code style Donate Patreon Crypto

Campaigns for Laravel

Send campaigns to many recipients through Laravel queues and job batches. Address them by email, contact record or contact owner, deliver by email, a Laravel notification or your own job, and keep campaigns in memory or in the database.

Installation

Requires PHP 8.4 and Laravel 12 or 13.

composer require roundly-consulting/campaigns-for-laravel
php artisan vendor:publish --tag="campaigns-migrations" --tag="options-migrations" --tag="contacts-migrations"
php artisan migrate

Every campaign runs as a job batch, so the app needs Laravel's job_batches table (php artisan make:queue-batches-table if it has none) and a running queue worker. To follow progress across requests, keep campaigns in the database rather than the default per-process memory: CAMPAIGNS_STORE='RoundlyConsulting\Campaigns\Stores\DatabaseCampaignStore'.

Usage

Create, address and send a campaign through the facade, then follow its progress:

use RoundlyConsulting\Campaigns\Facades\Campaigns;

$campaign = Campaigns::create('Buy today and spend less', '<p>Hello dear customer!</p>')
    ->from('no-reply@eshop.tld', 'Best E-Shop Ever')
    ->to(['john@doe.tld', 'jane@doe.tld'])     // emails, Contact records or HasContacts owners
    ->dispatch();                              // one queued delivery job per recipient

$progress = Campaigns::campaign($campaign->uuid)->progress();

$progress->percentage();                       // share delivered so far: 50.0
$progress->failed;                             // deliveries that failed
$progress->remaining();                        // recipients still to go

Campaigns::cancel($campaign->uuid);            // stop the rest

Documentation

The full documentation — configuration, every feature and its API, and testing — lives on our website: roundly-consulting.com/open-source/docs/campaigns-for-laravel

Release notes are in CHANGELOG.md. To contribute, see the contributing guide.

Support our work

This package is free and open source, built and maintained by Roundly Consulting. If it saves you time, please consider supporting our open-source work — a one-time donation, a monthly pledge on Patreon or a crypto donation helps fund maintenance, new features and new packages.

Donate to Roundly open source Become a patron on Patreon Donate crypto: BTC, ETH, BNB or SOL

License

The MIT License (MIT). See LICENSE.md.