PHPackages                             nairanomura/notificationapi - 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. nairanomura/notificationapi

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

nairanomura/notificationapi
===========================

Package to use notificationapi.com with laravel channel

1.0(2y ago)04MITPHPPHP ^8.1

Since Feb 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/NairanOmura/notificationapi-laravel)[ Packagist](https://packagist.org/packages/nairanomura/notificationapi)[ RSS](/packages/nairanomura-notificationapi/feed)WikiDiscussions main Synced 1mo ago

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

### Notification-api for Laravel

[](#notification-api-for-laravel)

Package created to use the notification-api Service () in Laravel projects

Official Doc for Notification Api:

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

[](#installation)

To get the latest version of `notificationapi-laravel` on your project, require it from "composer":

```
$ composer require nairanomura/notificationapi-laravel

```

Or you can add it directly in your composer.json file:

```
{
    "require": {
        "nairanomura/notificationapi-laravel": "1.0"
    }
}
```

### Config

[](#config)

Register the provider directly in your app configuration file `config/app.php`:

```
'providers' => [
	// ...

	NairanOmura\NotificationApi\NotificationApiServiceProvider::class,
]
```

The following lines will be auto added in `config/services.php` by provider.

```
return [

    //...
    'notification-api' => [
        'key' => env('NOTIFICATION_API_KEY'),
        'secret' => env('NOTIFICATION_API_SECRET'),
    ]
];
```

So add the following environment variables in .env file to finish a configuration:

```
#.env
NOTIFICATION_API_KEY=clientID
NOTIFICATION_API_SECRET=clientSecret
```

This keys was offered by notification api after register an account

### Using

[](#using)

Use Artisan to create a notification:

```
php artisan make:notification SomeNotification
```

Return `[notification-api]` in the `public function via($notifiable)` method of your notification:

```
public function via($notifiable)
{
    return ['notification-api'];
}
```

Add the method `public function toNotificationApi($notifiable)` to your notification:

```
//...

public function toNotificationApi($notifiable)
{
    return [
        "notificationId" => "notification_example",
        "user" => [
            "id" => $notifiable->getAttribute('id'),
            "email" => $notifiable->getAttribute('email'),
        ],
        "mergeTags" => [
            "userName" => auth()->user()->name,
            "clickAction" => config('app.env')."/example"
        ]
    ];
}
```

#### example of notification send

[](#example-of-notification-send)

\*Attention: To call notification by the user model, the User model must be "Notifiable" Trait

```
    class User extends Authenticatable
    {
        use Notifiable;
        //...
```

```
#notify one user
$user->notify((new SomeNotification(..)));

#notify multiple users
Notification::send($users, new SomeNotification(..);
```

### Extra: Helpers

[](#extra-helpers)

After install and configure we can use the library calling the helper `notification_api` or class `NotificationApiService`

Example:

```
$data = [
  "notificationId" => "order_tracking",
  "user" => [
    "id" => "example@mail.com",
    "email" => "example@mail.com",
    "number" => "+15005550006"
  ],
  "mergeTags" => [
    "item" => "Krabby Patty Burger",
    "address" => "124 Conch Street",
    "orderId" => "1234567890"
  ]
];

$result = notification_api($data);
#or
$result = (new NotificationApiService)->send($data)
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

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

Unknown

Total

1

Last Release

815d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/nairanomura-notificationapi/health.svg)

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

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/webpush

Web Push Notifications driver for Laravel.

7984.5M16](/packages/laravel-notification-channels-webpush)[laravel-notification-channels/fcm

FCM (Firebase Cloud Messaging) Notifications Driver for Laravel

5917.0M16](/packages/laravel-notification-channels-fcm)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)

PHPackages © 2026

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