multek/laravel-customer-engagement
Composer 安装命令:
composer require multek/laravel-customer-engagement
包简介
A unified customer engagement platform for Laravel — contracts, DTOs, and manager for push notifications, user sync, and event tracking across multiple providers.
README 文档
README
A unified customer engagement platform for Laravel. Provides contracts, DTOs, and a driver-based manager for push notifications, user sync, and event tracking across multiple providers.
Features
- Driver-Based Architecture - Swap providers (OneSignal, Braze, Firebase, etc.) without changing application code
- Capability Contracts -
SyncsUsers,SendsNotifications,TracksEventsinterfaces for fine-grained driver capabilities - Laravel Notification Channel -
EngagementChannelworks with Laravel's native notification system - DTOs -
Customer,Notification, andCustomerEventdata transfer objects for type-safe interactions - Model Trait -
HasCustomerEngagementfor syncing Eloquent models - Async Jobs - Queue-based customer sync with
SyncCustomer - Events -
NotificationSentandNotificationFailedevents for observability - Null Driver - Built-in null driver for testing and environments without a provider
Requirements
- PHP 8.2+
- Laravel 11.0+
Installation
composer require multek/laravel-customer-engagement
Publish the config file:
php artisan vendor:publish --tag=customer-engagement-config
Available Drivers
| Driver | Package | Capabilities |
|---|---|---|
| OneSignal | multek/laravel-onesignal |
Notifications, User Sync, Event Tracking |
| Null | Built-in | None (testing/fallback) |
Usage
Configuration
// config/customer-engagement.php 'default' => env('ENGAGEMENT_DRIVER', 'onesignal'),
Sending Notifications
use Multek\CustomerEngagement\Facades\Engagement; use Multek\CustomerEngagement\DTOs\Notification; $notification = new Notification( title: 'Order Shipped', body: 'Your order #456 has been shipped.', data: ['order_id' => 456], ); // Send to a single user Engagement::sendToUser('user_123', $notification); // Send to multiple users Engagement::sendToUsers(['user_1', 'user_2'], $notification); // Send to a segment Engagement::sendToSegment('Active Users', $notification);
User Sync
use Multek\CustomerEngagement\DTOs\Customer; $customer = new Customer( externalId: 'user_123', tags: ['plan' => 'pro', 'role' => 'admin'], ); Engagement::createUser($customer); Engagement::updateUser($customer); Engagement::deleteUser('user_123');
Event Tracking
use Multek\CustomerEngagement\DTOs\CustomerEvent; $event = new CustomerEvent( externalId: 'user_123', name: 'purchase', payload: ['amount' => 99.90, 'product' => 'Pro Plan'], ); Engagement::trackEvent($event);
Capability Checks
// Check what the current driver supports Engagement::syncsUsers(); // bool Engagement::sendsNotifications(); // bool Engagement::tracksEvents(); // bool // Check a specific driver Engagement::syncsUsers('onesignal'); // bool
Using a Specific Driver
// Override the default driver for a single call Engagement::sendToUser('user_123', $notification, driver: 'onesignal');
Creating a Custom Driver
Implement the contracts your provider supports:
use Multek\CustomerEngagement\Contracts\EngagementDriver; use Multek\CustomerEngagement\Contracts\SendsNotifications; use Multek\CustomerEngagement\Contracts\SyncsUsers; class BrazeDriver implements EngagementDriver, SendsNotifications, SyncsUsers { public function getName(): string { return 'braze'; } // Implement SendsNotifications methods... // Implement SyncsUsers methods... }
Register it in your service provider:
use Multek\CustomerEngagement\EngagementManager; public function boot(): void { $this->app->make(EngagementManager::class)->extend('braze', function () { return new BrazeDriver(config('services.braze')); }); }
Testing
composer test
License
MIT
multek/laravel-customer-engagement 适用场景与选型建议
multek/laravel-customer-engagement 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「notifications」 「laravel」 「push」 「firebase」 「onesignal」 「braze」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 multek/laravel-customer-engagement 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 multek/laravel-customer-engagement 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 multek/laravel-customer-engagement 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel Nova package that adds a notification feed in your Nova app.
Apple Push Notification & Feedback Provider
Laravel package to send push notifications to mobile devices (apns, gcm)
Captures outgoing SMS notifications
Send push notification to android|ios devices , support APNs, FCM
Alfabank REST API integration
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 37
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-01