PHPackages                             simianbv/notifications - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. simianbv/notifications

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

simianbv/notifications
======================

Subscription-based notification broker for Laravel

v1.0.1(3mo ago)0234MITPHPPHP ^8.1|^8.2|^8.3

Since Apr 14Pushed 3mo agoCompare

[ Source](https://github.com/Simian-m/notifications)[ Packagist](https://packagist.org/packages/simianbv/notifications)[ RSS](/packages/simianbv-notifications/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Notification Broker
===================

[](#notification-broker)

Subscription-based notification broker for Laravel. Employees subscribe to notification types (optionally scoped to a specific entity) and receive database + broadcast notifications when events occur.

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

[](#installation)

```
composer require simianbv/notifications
```

The service provider is auto-discovered. Publish and run the migration:

```
php artisan vendor:publish --tag=notifications-migrations
php artisan migrate
```

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=notifications-config
```

This creates `config/notifications.php`:

```
return [
    // Middleware applied to the subscription routes
    'middleware' => ['api'],

    // Optional route prefix (e.g. 'api/v1')
    'route_prefix' => '',

    // The model used for subscribers
    'employee_model' => \App\Models\Employee::class,
];
```

Usage
-----

[](#usage)

### Sending notifications

[](#sending-notifications)

```
use Simianbv\Notifications\Facades\NotificationBroker;

// Notify all subscribers of a type
NotificationBroker::notify('Refund', $refund, 'Terugbetaling verwerkt.');

// With a link
NotificationBroker::notify('Refund', $refund, 'Terugbetaling verwerkt.', '/finance/refunds/42');

// With extra data
NotificationBroker::notify('Order', $order, 'Order verzonden.', '/sales/orders/123', ['status' => 'shipped']);

// Type-only, no specific entity
NotificationBroker::notify('BankImport', null, 'Nieuwe bankimport verwerkt.');
```

The method returns the number of subscribers notified.

### Custom message and link resolvers

[](#custom-message-and-link-resolvers)

Register resolvers in a service provider to generate messages and links dynamically per type:

```
use Simianbv\Notifications\Notifications\SubscriptionNotification;

SubscriptionNotification::resolveMessageUsing('Refund', function ($refund, $data) {
    return "Refund #{$refund->getKey()} van {$refund->amount} is verwerkt.";
});

SubscriptionNotification::resolveLinkUsing('Refund', function ($refund, $data) {
    return "/finance/refunds/{$refund->getKey()}";
});
```

When resolvers are registered you can omit the `$message` and `$link` arguments:

```
NotificationBroker::notify('Refund', $refund);
```

Without resolvers or explicit arguments, the default message is `"{Type} #{id} is bijgewerkt."` and the link is `null`.

API routes
----------

[](#api-routes)

The routes use the middleware and prefix from the config.

MethodURIDescription`GET``/subscriptions`List all current user's subscriptions by type`GET``/subscriptions/{type}/{entityId?}`List current user's subscriptions for a type`POST``/subscriptions/{type}/{entityId?}`Subscribe current user`DELETE``/subscriptions/{type}/{entityId?}`Unsubscribe current user`GET``/subscriptions/{type}/{entityId?}/subscribers`List all subscribers### Examples

[](#examples)

```
GET    /subscriptions                 → list all my subscriptions grouped by type
GET    /subscriptions/Refund          → list my refund subscriptions
POST   /subscriptions/Refund          → subscribe to all refunds
POST   /subscriptions/Refund/42       → subscribe to refund #42
DELETE /subscriptions/Refund           → unsubscribe from all refunds
DELETE /subscriptions/Refund/42        → unsubscribe from refund #42
GET    /subscriptions/Refund/42/subscribers → who is subscribed to refund #42

```

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance81

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Every ~0 days

Total

2

Last Release

101d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/80dd6fdf3d3250ac6f3b018db939ac5acdc485e26c0a8a3388a06ae452d292e5?d=identicon)[Simian-m](/maintainers/Simian-m)

---

Top Contributors

[![Simian-m](https://avatars.githubusercontent.com/u/37339938?v=4)](https://github.com/Simian-m "Simian-m (12 commits)")

---

Tags

laravelnotificationssubscriptions

### Embed Badge

![Health badge](/badges/simianbv-notifications/health.svg)

```
[![Health](https://phpackages.com/badges/simianbv-notifications/health.svg)](https://phpackages.com/packages/simianbv-notifications)
```

###  Alternatives

[liran-co/laravel-notification-subscriptions

Notification subscription management.

128250.6k1](/packages/liran-co-laravel-notification-subscriptions)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.8k](/packages/scriptdevelop-whatsapp-manager)[team-nifty-gmbh/laravel-rocket-chat-notifications

Rocket.Chat Notifications for laravel

301.9k](/packages/team-nifty-gmbh-laravel-rocket-chat-notifications)

PHPackages © 2026

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