PHPackages                             subit/expo-laravel - 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. subit/expo-laravel

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

subit/expo-laravel
==================

Expo notifications driver for Laravel

v5.4.2(1y ago)16.2k↓18.9%MITPHPPHP &gt;=7.4CI failing

Since Feb 14Pushed 1y ago2 watchersCompare

[ Source](https://github.com/subit-io/expo-laravel)[ Packagist](https://packagist.org/packages/subit/expo-laravel)[ Docs](https://github.com/subit-io/expo-laravel)[ RSS](/packages/subit-expo-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (18)Used By (0)

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

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/5d8c79e98203f88a8cc865b1148aeec1c986de49e4b75b181b90e3d757b2dda2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73756269742f6578706f2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/subit/expo-laravel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/8c125089662002729814d858b8928b0a1d96095b75715006f70ee0ea31ef3bad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73756269742f6578706f2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/subit/expo-laravel)

Contents
--------

[](#contents)

- [Installation](#installation)
- [Usage](#usage) - [ExpoMessage options](#expomessage-options)

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

[](#installation)

You can install the package via composer:

```
composer require subit-io/laravel-expo-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_RECIPIENTS_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 `expo_notification_recipients` 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 [
    'recipients' => [
        /*
         * Supported: "database"
         */
        'driver' => env('EXPONENT_PUSH_NOTIFICATION_RECIPIENTS_STORAGE_DRIVER', 'file'),

        'database' => [
            'table_name' => 'expo_notification_recipients',
        ],
    ]
];
```

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!");
    }
}
```

`ExpoMessage` options
---------------------

[](#expomessage-options)

PropertyiOS/AndroidTypeDescription`to()`bothstringAn Expo push token specifying the recipient of this message`jsonData()`bothstringA JSON object delivered to your app. It may be up to 4KiB`title()`bothstringThe title to display in the notification`body()`bothstringThe message to display in the notification`ttl()`bothintSeconds the message may be kept around for redelivery`expiration()`bothintUNIX epoch timestamp. Same effect as ttl. ttl takes precedence`priority()`bothPriorityThe delivery priority of the message`subtitle()`iOSstringThe subtitle to display in the notification below the title`enableSound()`iOSPlay a sound when the recipient receives this notification`disableSound()`iOSPlay no sound (default)`badge()`iOSintNumber to display in the badge on the app icon`channelId()`AndroidstringChannel through which to display this notificationFor a more detailed description, refer to the Expo documentation

### 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 expo "recipient" messages will be sent to will be defined (besides the id) using the notifiable class as type, for example `App\User`. However, you can change this behaviour by including a `routeNotificationForExpoPushNotifications()` in the notifiable class method that returns the recipient type.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 81.8% 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 ~112 days

Total

16

Last Release

600d ago

Major Versions

v1.0.0 → v2.0.02020-03-24

v2.0.0 → v3.0.02020-09-10

v3.0.0 → v4.0.02020-12-18

v4.1.0 → v5.0.02021-09-28

PHP version history (2 changes)v1.0.0PHP ^7.1.3

v4.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/94b0a2b01d629673d5ecb75671a3097d225b695c58a17ac11954aff49ebc6fa1?d=identicon)[ebsp](/maintainers/ebsp)

---

Top Contributors

[![edyakubov](https://avatars.githubusercontent.com/u/92101866?v=4)](https://github.com/edyakubov "edyakubov (9 commits)")[![ebsp](https://avatars.githubusercontent.com/u/1406975?v=4)](https://github.com/ebsp "ebsp (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/subit-expo-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/subit-expo-laravel/health.svg)](https://phpackages.com/packages/subit-expo-laravel)
```

###  Alternatives

[spatie/laravel-failed-job-monitor

Get notified when a queued job fails

1.0k2.6M4](/packages/spatie-laravel-failed-job-monitor)[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)
