PHPackages                             scary-layer/laravel-exponent-push-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. scary-layer/laravel-exponent-push-notifications

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

scary-layer/laravel-exponent-push-notifications
===============================================

Exponent push notifications driver for laravel

v3.0.0(4y ago)01.4kMITPHPPHP ^8.0

Since Jul 9Pushed 3y agoCompare

[ Source](https://github.com/scary-layer/laravel-exponent-push-notifications)[ Packagist](https://packagist.org/packages/scary-layer/laravel-exponent-push-notifications)[ Docs](https://github.com/alymosul/laravel-exponent-push-notifications)[ RSS](/packages/scary-layer-laravel-exponent-push-notifications/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (15)Used By (0)

Exponent push notifications channel for Laravel
===============================================

[](#exponent-push-notifications-channel-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1411320c0c13c45dfc153d49aec527ba4bbf2bde34206e598cc0285a216bd169/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c796d6f73756c2f6c61726176656c2d6578706f6e656e742d707573682d6e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alymosul/laravel-exponent-push-notifications)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/d8aacf3576d8e8902e2ae305d457ea76f9ddd8145ca91fc628a346f4e4678ec7/68747470733a2f2f7472617669732d63692e6f72672f416c796d6f73756c2f6c61726176656c2d6578706f6e656e742d707573682d6e6f74696669636174696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Alymosul/laravel-exponent-push-notifications)[![StyleCI](https://camo.githubusercontent.com/253280e4dd9a2f41696de21f30ab5db15a478b55e93baaf7e3558c9fc18f6da7/68747470733a2f2f7374796c6563692e696f2f7265706f732f39363634353230302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/96645200)[![SensioLabsInsight](https://camo.githubusercontent.com/45eba6496c5d129ec730ba1497fb0b95b98ed1e71c9152516ec986e0eb100f88/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f61666530626139612d653335632d343735392d613036662d3134613038316366343532632e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/afe0ba9a-e35c-4759-a06f-14a081cf452c)[![Quality Score](https://camo.githubusercontent.com/0ea0328e557964ac873125d16425caf4912fa34b8aaf6959a6e5415c71e533a1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f616c796d6f73756c2f6c61726176656c2d6578706f6e656e742d707573682d6e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/alymosul/laravel-exponent-push-notifications)[![Code Coverage](https://camo.githubusercontent.com/d54cd77777efcfd2ad72e419907b627baaba71dc27c8a1b87773d8930084b35d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f616c796d6f73756c2f6c61726176656c2d6578706f6e656e742d707573682d6e6f74696669636174696f6e732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/alymosul/laravel-exponent-push-notifications/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/0d16b97f637bba0051ec0cee6537f412199762891064def81cd1fb0a3119c15a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c796d6f73756c2f6c61726176656c2d6578706f6e656e742d707573682d6e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alymosul/laravel-exponent-push-notifications)

Contents
--------

[](#contents)

- [Installation](#installation)
- [Usage](#usage) - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require alymosul/laravel-exponent-push-notifications
```

If you are using Laravel 5.5 or higher this package will automatically register itself using [Package Discovery](https://laravel.com/docs/5.5/packages#package-discovery). For older versions of Laravel you must install the service provider manually:

```
// config/app.php
'providers' => [
    ...
    NotificationChannels\ExpoPushNotifications\ExpoPushNotificationsServiceProvider::class,
],
```

Before publish exponent notification migration you must add in .env file:

```
EXPONENT_PUSH_NOTIFICATION_INTERESTS_STORAGE_DRIVER=database
```

You can publish the migration with:

```
php artisan vendor:publish --provider="NotificationChannels\ExpoPushNotifications\ExpoPushNotificationsServiceProvider" --tag="migrations"
```

After publishing the migration you can create the `exponent_push_notification_interests` table by running the migrations:

```
php artisan migrate
```

You can optionally publish the config file with:

```
php artisan vendor:publish --provider="NotificationChannels\ExpoPushNotifications\ExpoPushNotificationsServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [
    'interests' => [
        /*
         * Supported: "file", "database"
         */
        'driver' => env('EXPONENT_PUSH_NOTIFICATION_INTERESTS_STORAGE_DRIVER', 'file'),

        'database' => [
            'events' => [],

            'table_name' => 'exponent_push_notification_interests',
        ],
    ]
];
```

Usage
-----

[](#usage)

```
use NotificationChannels\ExpoPushNotifications\ExpoChannel;
use NotificationChannels\ExpoPushNotifications\ExpoMessage;
use Illuminate\Notifications\Notification;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [ExpoChannel::class];
    }

    public function toExpoPush($notifiable)
    {
        return ExpoMessage::create()
            ->badge(1)
            ->enableSound()
            ->title("Congratulations!")
            ->body("Your {$notifiable->service} account was approved!");
    }
}
```

### Available Message methods

[](#available-message-methods)

A list of all available options

- `title('')`: Accepts a string value for the title.
- `body('')`: Accepts a string value for the body.
- `enableSound()`: Enables the notification sound.
- `disableSound()`: Mutes the notification sound.
- `badge(1)`: Accepts an integer value for the badge.
- `ttl(60)`: Accepts an integer value for the time to live.
- `setJsonData('')`: Accepts a json string or an array for additional.
- `channelID('')`: Accepts a string to set the channelId of the notification for Android devices.
- `priority('default')`: Accepts a string to set the priority of the notification, must be one of \[default, normal, high\].

### Managing Recipients

[](#managing-recipients)

This package registers two endpoints that handle the subscription of recipients, the endpoints are defined in src/Http/routes.php file, used by ExpoController and all loaded through the package service provider.

### Routing a message

[](#routing-a-message)

By default the exponent "interest" messages will be sent to will be defined using the {notifiable}.{id} convention, for example `App.User.1`, however you can change this behaviour by including a `routeNotificationForExpoPushNotifications()` in the notifiable class method that returns the interest name.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Aly Suleiman](https://github.com/Alymosul)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~133 days

Recently: every ~186 days

Total

14

Last Release

1500d ago

Major Versions

v1.7.0 → 2.0.02019-09-20

v2.4.0 → v3.0.02022-04-04

PHP version history (4 changes)v1.0PHP &gt;=7.0

2.0.0PHP ^7.1.3

2.3.0PHP ^7.1.3|^8.0

v3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/88b8177c90c52cb107f7047e9c090fc0324ac6f1b1cf2eab80cb983141428325?d=identicon)[scary-layer](/maintainers/scary-layer)

---

Top Contributors

[![Alymosul](https://avatars.githubusercontent.com/u/8314647?v=4)](https://github.com/Alymosul "Alymosul (65 commits)")[![patrickkivits](https://avatars.githubusercontent.com/u/727174?v=4)](https://github.com/patrickkivits "patrickkivits (21 commits)")[![pelmered](https://avatars.githubusercontent.com/u/680058?v=4)](https://github.com/pelmered "pelmered (9 commits)")[![sebastiansson](https://avatars.githubusercontent.com/u/3044878?v=4)](https://github.com/sebastiansson "sebastiansson (7 commits)")[![ddedic](https://avatars.githubusercontent.com/u/49714?v=4)](https://github.com/ddedic "ddedic (4 commits)")[![Rubens10010](https://avatars.githubusercontent.com/u/11839305?v=4)](https://github.com/Rubens10010 "Rubens10010 (3 commits)")[![mediabc](https://avatars.githubusercontent.com/u/19846393?v=4)](https://github.com/mediabc "mediabc (3 commits)")[![abdullah-abunada](https://avatars.githubusercontent.com/u/1808834?v=4)](https://github.com/abdullah-abunada "abdullah-abunada (2 commits)")[![enriconardo](https://avatars.githubusercontent.com/u/870900?v=4)](https://github.com/enriconardo "enriconardo (2 commits)")[![jindraregal](https://avatars.githubusercontent.com/u/4135505?v=4)](https://github.com/jindraregal "jindraregal (2 commits)")[![luklapp](https://avatars.githubusercontent.com/u/6569846?v=4)](https://github.com/luklapp "luklapp (2 commits)")[![macr1408](https://avatars.githubusercontent.com/u/13187467?v=4)](https://github.com/macr1408 "macr1408 (2 commits)")[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (2 commits)")[![samuelvisscher](https://avatars.githubusercontent.com/u/11761002?v=4)](https://github.com/samuelvisscher "samuelvisscher (2 commits)")[![minimatrix](https://avatars.githubusercontent.com/u/23636134?v=4)](https://github.com/minimatrix "minimatrix (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")[![ospnko](https://avatars.githubusercontent.com/u/35662725?v=4)](https://github.com/ospnko "ospnko (1 commits)")[![jeanlucnguyen](https://avatars.githubusercontent.com/u/10912221?v=4)](https://github.com/jeanlucnguyen "jeanlucnguyen (1 commits)")[![hirbod](https://avatars.githubusercontent.com/u/504909?v=4)](https://github.com/hirbod "hirbod (1 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/scary-layer-laravel-exponent-push-notifications/health.svg)

```
[![Health](https://phpackages.com/badges/scary-layer-laravel-exponent-push-notifications/health.svg)](https://phpackages.com/packages/scary-layer-laravel-exponent-push-notifications)
```

###  Alternatives

[spatie/laravel-failed-job-monitor

Get notified when a queued job fails

1.0k2.6M4](/packages/spatie-laravel-failed-job-monitor)[alymosul/laravel-exponent-push-notifications

Exponent push notifications driver for laravel

142729.0k1](/packages/alymosul-laravel-exponent-push-notifications)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[spatie/mailcoach

Self-host Mailcoach

4007.0k](/packages/spatie-mailcoach)[synergitech/laravel-postal

This library integrates Postal with the standard Laravel mail framework.

38107.1k](/packages/synergitech-laravel-postal)[motomedialab/smtp2go

Send emails via API using the first-class email courier SMTP2Go

1316.3k](/packages/motomedialab-smtp2go)

PHPackages © 2026

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