---
title: "Events — Campaigns for Laravel | Roundly"
description: "Seven lifecycle and recipient events with their payloads, for logging, dashboards, metrics and webhooks."
url: https://roundly-consulting.com/open-source/docs/campaigns-for-laravel/events
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Campaigns for Laravel](https://roundly-consulting.com/open-source/docs/campaigns-for-laravel.md)

# Events

Listen to lifecycle and recipient events to drive logging, dashboards, metrics or webhooks. They live in RoundlyConsulting\\Campaigns\\Events and expose their payload as public readonly properties:

| Event | Payload | Fired when |
| --- | --- | --- |
| `CampaignPrepared` | `campaign` | prepare() stored the recipients and moved the campaign to Pending. |
| `CampaignStarted` | `campaign` | start() moved the campaign to Processing. |
| `CampaignCompleted` | `campaign` | Every delivery job ran (some may have failed — see progress->failed), or there was nobody to send to. |
| `CampaignFailed` | `campaign` | Every delivery job ran and not one delivery got through — fired instead of CampaignCompleted. |
| `CampaignCancelled` | `campaign` | cancel() cancelled the campaign. |
| `RecipientProcessed` | `campaign, recipient` | A recipient job delivered successfully. |
| `RecipientFailed` | `campaign, recipient, error` | A recipient job recorded a failure; error is the message. |

```php
use Illuminate\Support\Facades\Event;
use RoundlyConsulting\Campaigns\Events\CampaignCompleted;
use RoundlyConsulting\Campaigns\Events\RecipientFailed;

// In a service provider's boot() method:
Event::listen(function (CampaignCompleted $event): void {
    logger()->info('Campaign finished', $event->campaign->progress->toArray());
});

Event::listen(function (RecipientFailed $event): void {
    logger()->warning('Campaign delivery failed', [
        'campaign' => $event->campaign->uuid,
        'recipient' => $event->recipient->reachableAt,
        'error' => $event->error,
    ]);
});
```

Lifecycle events carry the campaign with progress synced from its recipients and batch at that transition, so CampaignCompleted reports the final counts — failures included. They fire only on a real status change. Recipient events fire from inside the recipient jobs — on your queue workers.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/campaigns-for-laravel.md)
