PHPackages                             multek/laravel-customer-engagement - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. multek/laravel-customer-engagement

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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.

v1.0.0(3mo ago)011MITPHPPHP ^8.2

Since Apr 1Pushed 3mo agoCompare

[ Source](https://github.com/Multek-Company/laravel-customer-engagement)[ Packagist](https://packagist.org/packages/multek/laravel-customer-engagement)[ RSS](/packages/multek-laravel-customer-engagement/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (4)Used By (1)

Laravel Customer Engagement
===========================

[](#laravel-customer-engagement)

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

[](#features)

- **Driver-Based Architecture** - Swap providers (OneSignal, Braze, Firebase, etc.) without changing application code
- **Capability Contracts** - `SyncsUsers`, `SendsNotifications`, `TracksEvents` interfaces for fine-grained driver capabilities
- **Laravel Notification Channel** - `EngagementChannel` works with Laravel's native notification system
- **DTOs** - `Customer`, `Notification`, and `CustomerEvent` data transfer objects for type-safe interactions
- **Model Trait** - `HasCustomerEngagement` for syncing Eloquent models
- **Async Jobs** - Queue-based customer sync with `SyncCustomer`
- **Events** - `NotificationSent` and `NotificationFailed` events for observability
- **Null Driver** - Built-in null driver for testing and environments without a provider

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11.0+

Installation
------------

[](#installation)

```
composer require multek/laravel-customer-engagement
```

Publish the config file:

```
php artisan vendor:publish --tag=customer-engagement-config
```

Available Drivers
-----------------

[](#available-drivers)

DriverPackageCapabilitiesOneSignal[`multek/laravel-onesignal`](https://github.com/Multek-Company/laravel-onesignal)Notifications, User Sync, Event TrackingNullBuilt-inNone (testing/fallback)Usage
-----

[](#usage)

### Configuration

[](#configuration)

```
// config/customer-engagement.php
'default' => env('ENGAGEMENT_DRIVER', 'onesignal'),
```

### Sending Notifications

[](#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

[](#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

[](#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

[](#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

[](#using-a-specific-driver)

```
// Override the default driver for a single call
Engagement::sendToUser('user_123', $notification, driver: 'onesignal');
```

Creating a Custom Driver
------------------------

[](#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
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance82

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

92d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8976719?v=4)[rodrigocoliveira](/maintainers/rodrigocoliveira)[@rodrigocoliveira](https://github.com/rodrigocoliveira)

---

Top Contributors

[![rodrigocoliveira](https://avatars.githubusercontent.com/u/8976719?v=4)](https://github.com/rodrigocoliveira "rodrigocoliveira (4 commits)")

---

Tags

laravelpushnotificationsfirebaseonesignalbrazecustomer-engagement

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/multek-laravel-customer-engagement/health.svg)

```
[![Health](https://phpackages.com/badges/multek-laravel-customer-engagement/health.svg)](https://phpackages.com/packages/multek-laravel-customer-engagement)
```

###  Alternatives

[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M208](/packages/illuminate-broadcasting)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k55.0M613](/packages/laravel-scout)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M295](/packages/laravel-horizon)[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k11.8M116](/packages/nuwave-lighthouse)[illuminate/events

The Illuminate Events package.

13557.0M2.1k](/packages/illuminate-events)[illuminate/notifications

The Illuminate Notifications package.

513.1M1.1k](/packages/illuminate-notifications)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
