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

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

apsbd/laravel-exponent-push-notifications
=========================================

Exponent push notifications driver for laravel

v3.0.0(4y ago)063MITPHPPHP ^8.0

Since Jul 9Pushed 3y agoCompare

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

READMEChangelog (1)Dependencies (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/4b09e17962b53e7bee74b12cc948d59e90911512a77f4c94b0c4bb9cc4242f67/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61707362642f6c61726176656c2d6578706f6e656e742d707573682d6e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/apsbd/laravel-exponent-push-notifications)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/002593e602dc3e0415241fb5b000b34adef8384a6663c9502710758b2b476948/68747470733a2f2f7472617669732d63692e6f72672f61707362642f6c61726176656c2d6578706f6e656e742d707573682d6e6f74696669636174696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/apsbd/laravel-exponent-push-notifications)[![StyleCI](https://camo.githubusercontent.com/253280e4dd9a2f41696de21f30ab5db15a478b55e93baaf7e3558c9fc18f6da7/68747470733a2f2f7374796c6563692e696f2f7265706f732f39363634353230302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/96645200)

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 apsbd/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)

- [Mohiuddin Ahmed](https://github.com/apsbd)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

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

1497d 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/1383bea70dae51718729f7689b10663cd1ed70d76ad7743f1077e32b833ac7d1?d=identicon)[apsbd](/maintainers/apsbd)

---

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)")[![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)")[![Julian367](https://avatars.githubusercontent.com/u/7355974?v=4)](https://github.com/Julian367 "Julian367 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/apsbd-laravel-exponent-push-notifications/health.svg)](https://phpackages.com/packages/apsbd-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)
