---
title: "Installation — Campaigns for Laravel | Roundly"
description: "Install via Composer, run the options and contacts migrations, and publish the config and campaign tables only when you need them."
url: https://roundly-consulting.com/open-source/docs/campaigns-for-laravel/installation
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)

# Installation

Require the package with Composer. The service provider and the Campaigns facade alias are auto-discovered — no manual registration:

```bash
composer require roundly-consulting/campaigns-for-laravel
```

## Companion packages

Composer also installs the packages Campaigns builds on — contacts-for-laravel, options-for-laravel and enums-for-laravel, plus package-toolkit-for-laravel. Their migrations are publish-only. The send defaults (sender, sending queue, channel) are read through options-for-laravel whenever a campaign is prepared and whenever a recipient job is built, so publish and run its migration. The contacts migration is what lets you address campaigns from contact records:

```bash
php artisan vendor:publish --tag="options-migrations"
php artisan vendor:publish --tag="contacts-migrations"
php artisan migrate
```

## Config file

The config file is optional — every key has a default, and all but one are env-backed. Publish it only to override:

```bash
php artisan vendor:publish --tag="campaigns-config"
```

## Campaign tables (optional)

The default in-memory store needs no tables of its own. Only the database store needs the campaigns and campaign\_recipients tables. The migrations are never loaded automatically — publish them first, or a bare migrate won’t create them:

```bash
php artisan vendor:publish --tag="campaigns-migrations"
php artisan migrate
```

## Job batches

Every campaign runs as a Laravel job batch, stored in the job\_batches table. New Laravel 12 and 13 apps create it in the default jobs migration; if yours doesn’t have it, generate it:

```bash
php artisan make:queue-batches-table
php artisan migrate
```

## Publish tags

- campaigns-config — config/campaigns.php.
- campaigns-migrations — create\_campaigns\_table and create\_campaign\_recipients\_table, timestamped on publish in that order.

## 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)
