cleyverson/brevo-engage
Composer 安装命令:
composer require cleyverson/brevo-engage
包简介
Provider-agnostic customer engagement and marketing automation for Laravel.
README 文档
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.
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-14