### Install Campaigns for Laravel with Composer and Artisan Source: https://github.com/roundly-consulting/campaigns-for-laravel/blob/main/README.md Install the package via Composer and publish the required migrations. Requires PHP 8.4 and Laravel 12 or 13. The app must have the job_batches table and a running queue worker; use CAMPAIGNS_STORE='RoundlyConsulting\Campaigns\Stores\DatabaseCampaignStore' to keep campaigns in the database. ```bash composer require roundly-consulting/campaigns-for-laravel php artisan vendor:publish --tag="campaigns-migrations" --tag="options-migrations" --tag="contacts-migrations" php artisan migrate ``` -------------------------------- ### Create and Dispatch a Campaign with the Campaigns Facade Source: https://github.com/roundly-consulting/campaigns-for-laravel/blob/main/README.md Shows how to create a campaign, set the sender, add recipients (emails, Contact records, or HasContacts owners), and dispatch it as queued jobs. Also demonstrates checking progress, retrieving failed deliveries, and cancelling the campaign. ```php use RoundlyConsulting\Campaigns\Facades\Campaigns; $campaign = Campaigns::create('Buy today and spend less', '
Hello dear customer!
') ->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 ```