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

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

firegon/laravel-expo-notifier
=============================

Easily send Expo notifications with Laravel.

0.0.1(11mo ago)0861MITPHPPHP ^8.1

Since May 29Pushed 11mo agoCompare

[ Source](https://github.com/LucasSch2410/laravel-expo-notifier)[ Packagist](https://packagist.org/packages/firegon/laravel-expo-notifier)[ Docs](https://github.com/LucasSch2410/laravel-expo-notifier)[ RSS](/packages/firegon-laravel-expo-notifier/feed)WikiDiscussions main Synced 1mo ago

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

laravel-expo-notifier
=====================

[](#laravel-expo-notifier)

Easily manage Expo notifications with Laravel. Support batched notifications.

[![Latest Version](https://camo.githubusercontent.com/f483148f7ab559c04b50869672b4609042a3fb1f840be4596d594d4f16aa27f8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7969656c6473747564696f2f6c61726176656c2d6578706f2d6e6f7469666965723f7374796c653d666c61742d737175617265)](https://github.com/yieldstudio/laravel-expo-notifier/releases)[![GitHub Workflow Status](https://camo.githubusercontent.com/578457ea7be8e7bdf605d2dcd31de2d4bdfc2005e0bc9360c11185365a78c60e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7969656c6473747564696f2f6c61726176656c2d6578706f2d6e6f7469666965722f74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://github.com/yieldstudio/laravel-expo-notifier/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/4015fbbe6b5e164e8c58e9e40b97ecdfb32457db918b94e33e3a16287413d0c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7969656c6473747564696f2f6c61726176656c2d6578706f2d6e6f7469666965723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yieldstudio/laravel-expo-notifier)

> Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.

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

[](#installation)

```
composer require yieldstudio/laravel-expo-notifier

```

Configure
---------

[](#configure)

You must publish the configuration file with:

```
php artisan vendor:publish --provider="YieldStudio\LaravelExpoNotifier\ExpoNotificationsServiceProvider" --tag="expo-notifications-config" --tag="expo-notifications-migration"
```

### Available environment variables

[](#available-environment-variables)

- `EXPO_PUSH_NOTIFICATIONS_PER_REQUEST_LIMIT` : sets the max notifications sent on a bulk request. [The official documentation says the limit should be 100](https://docs.expo.dev/push-notifications/sending-notifications/#request-errors) but in fact it's failing. You can tweak it by setting a value under 100.
- `EXPO_NOTIFICATIONS_ACCESS_TOKEN` : sets the Expo access token used to send notifications with an [additional layer of security](https://docs.expo.dev/push-notifications/sending-notifications/#additional-security). You can get your access token from [your Expo dashboard](https://expo.dev/accounts/%5Baccount%5D/settings/access-tokens).

Usage
-----

[](#usage)

### Add relation for notifiable class

[](#add-relation-for-notifiable-class)

In order to use Notification, you need to declare the relation `expoTokens` on your Notifiable class. Two Trait are available to help you :

- `HasUniqueExpoToken` if your notifiable class can have only one expo token
- `HasManyExpoToken` if your notifiable class can have many expo token

### Send notification

[](#send-notification)

```
