cleyverson/brevo-engage

Provider-agnostic customer engagement and marketing automation for Laravel.

Maintainers

Package info

github.com/cleyversoncosta/brevo-engage

pkg:composer/cleyverson/brevo-engage

Statistics

Installs: 17

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.3 2026-06-16 18:31 UTC

This package is auto-updated.

Last update: 2026-06-16 18:32:26 UTC


README

Provider-agnostic customer engagement and marketing automation for Laravel 10, 11, and 12.

Applications call Cleyverson\Engage\Facades\Engage; provider adapters own provider-specific code, so integrations such as Brevo, Mautic, Customer.io, Dittofeed, HubSpot, or Mailchimp can be added without changing application code.

Installation

composer require cleyverson/engage
composer require sarfrazrizwan/laravel-brevo mautic/api-library
php artisan vendor:publish --tag=engage-config
php artisan vendor:publish --tag=engage-migrations
php artisan migrate

Configuration

Brevo remains the default provider for backward compatibility:

ENGAGE_PROVIDER=brevo

To use Mautic:

ENGAGE_PROVIDER=mautic

MAUTIC_BASE_URL=
MAUTIC_USERNAME=
MAUTIC_PASSWORD=

Published configuration:

return [
    'provider' => env('ENGAGE_PROVIDER', 'brevo'),
    'environment' => env('ENGAGE_ENVIRONMENT'),
    'queue' => true,
    'track_events' => true,
    'sync_contacts' => true,
    'templates' => [
        'welcome' => 12,
    ],
    'lists' => [
        'premium-users' => 42,
    ],
    'mautic' => [
        'base_url' => env('MAUTIC_BASE_URL'),
        'username' => env('MAUTIC_USERNAME'),
        'password' => env('MAUTIC_PASSWORD'),
    ],
];

Usage

use Cleyverson\Engage\Facades\Engage;

Engage::identify($user);

Engage::identify($user, [
    'project' => 'WalletUP',
    'language' => 'en',
]);

Engage::track('login', $user);

Engage::track('login', $user, [
    'device' => 'mobile',
]);

Engage::addTag('premium', $user);
Engage::removeTag('premium', $user);

Engage::addToSegment('WalletUP', $user);
Engage::removeFromSegment('WalletUP', $user);

Existing Brevo list and email helpers continue to work:

Engage::sendTemplate('welcome', $user, [
    'first_name' => $user->name,
]);

Engage::addToList('premium-users', $user);
Engage::removeFromList('premium-users', $user);

All outbound provider communication is performed by queued jobs. Events are always persisted in the engagement_events table before provider delivery; Mautic records stay in that table because Mautic does not expose a Brevo-equivalent custom event API.