PHPackages                             jmpatricio/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. jmpatricio/notifications

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

jmpatricio/notifications
========================

Notifications package for Laravel

14PHP

Since Jul 30Pushed 10y ago2 watchersCompare

[ Source](https://github.com/jmpatricio/notifications)[ Packagist](https://packagist.org/packages/jmpatricio/notifications)[ RSS](/packages/jmpatricio-notifications/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Notifications
=============

[](#notifications)

Laravel 4.2.x Package
---------------------

[](#laravel-42x-package)

This package provides an abstract layer to manage notifications (eg. email notifications) in Laravel Framework, fired by triggers. This package was developed to work with Laravel 4.2.x but it will work with 5.1 LTS.

Instalation
-----------

[](#instalation)

1. Run `composer require jmpatricio/notifications`
2. Add `Jmpatricio\Notifications\NotificationsServiceProvider` to your service providers in `config/app.php`
3. Instalation Done.

Basic usage
-----------

[](#basic-usage)

Create the trigger

```
$notificationsManager = new \Jmpatricio\Notifications\Manager();
$trigger = $notificationsManager->getTriggerRepository()->add('user.newRegistration', 'When the user register');

```

Once we have the trigger instace created, we can create an action to be fired.

An action have a configuration, which depends of the notification provider.

```
$configuration = [
    'view'      => 'emails/newUserRegistration',
    'fromEmail' => 'noreply@mywebsite.dev',
    'fromName'  => 'Notifications',
    'toEmail'   => 'some@email.dev',
    'toName'    => 'Staff user',
    'subject'   => 'New user registered!'
];
$configuration = \Jmpatricio\Notifications\Providers\Configuration::createFromArray($configuration);

```

Now we have the desired configuration. Let's create the action for this trigger

```
$notificationsManager->getActionRepository()->add($trigger, 'email', $configuration);

```

At this point we already have the action configured to run every time the trigger `user.newRegistration` is fired.

This is an example to fire the trigger:

```
// Payload will be the new user object This is only an example
$payload = new stdClass();
$payload->name = 'John';

try {
    $notificationsManager->fire($trigger->slug, $payload);
} catch (\Jmpatricio\Notifications\Exceptions\ConfigurationNotValidException $e){
    echo "";
        print_r($e->getErrors());
    echo "";
}

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cef0df3505a8a3511b8e4695fb6febd6b0927a62641f6a138d853d1d57a07f64?d=identicon)[jmpatricio](/maintainers/jmpatricio)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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