gopal-gautam/laravel-expo-notification-channel

There is no license information available for the latest version (dev-master) of this package.

Expo push notification channel for laravel projects

dev-master 2019-11-18 05:21 UTC

This package is auto-updated.

Last update: 2024-04-18 14:38:46 UTC


README

This package will provide the notification channel for expo push notification

Setup

composer require gopal-gautam/laravel-expo-notification-channel
php artisan vendor:publish

Prepare your model

You can use this in your notifiable model. You will need a column in your database to save device token for expo. You can specify that in expo_notification.php config file All you have to do now is add use ExpoPushNotifiable trait in your model:

use ExpoPushNotifiable;

Adding via

In your notification add ExpoNotificationChannel

/**  
 * Get the notification's delivery channels. * * @param mixed  $notifiable  
 * @return array  
 */public function via($notifiable)  
{  
  return [ExpoPushNotificationChannel::class];  
}