gopal-gautam / laravel-expo-notification-channel
此包最新版本(dev-master)没有提供许可信息。
适用于Laravel项目的Expo推送通知通道
dev-master
2019-11-18 05:21 UTC
Requires
- guzzlehttp/guzzle: ^6.5@dev
This package is auto-updated.
Last update: 2024-09-18 15:52:29 UTC
README
此包将为Expo推送通知提供通知通道
设置
composer require gopal-gautam/laravel-expo-notification-channel
php artisan vendor:publish
准备你的模型
你可以在你的通知模型中使用这个包。你需要在数据库中添加一个列来保存Expo的设备令牌。你可以在expo_notification.php配置文件中指定它。你现在需要做的是在你的模型中添加use ExpoPushNotifiable特性
use ExpoPushNotifiable;
添加方式
在你的通知中添加ExpoNotificationChannel
/**
* Get the notification's delivery channels. * * @param mixed $notifiable
* @return array
*/public function via($notifiable)
{
return [ExpoPushNotificationChannel::class];
}