awaluddinkasim/onesignal-pushnotification 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

awaluddinkasim/onesignal-pushnotification

最新稳定版本:v1.0.4

Composer 安装命令:

composer require awaluddinkasim/onesignal-pushnotification

包简介

A simple Laravel package for seamless integration with OneSignal push notification service

README 文档

README

A Laravel package for seamless integration with OneSignal push notification service.

Latest Stable Version License PHP Version Require

Introduction

OneSignal is a platform that offers multiple messaging channels including mobile push notifications, web push, SMS, email, and in-app messaging. This Laravel package specifically focuses on implementing push notifications functionality from OneSignal's services into your Laravel application. Check out the documentation for more information about OneSignal.

Installation

To install this package, simply run the following command:

composer require awaluddinkasim/onesignal-pushnotification

Next, run the this command to publish the configuration file:

php artisan vendor:publish --provider="AwaluddinKasim\OneSignalPushNotification\OneSignalServiceProvider"

Usage

Add your OneSignal App ID and API Key to your .env file:

ONESIGNAL_APP_ID=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ONESIGNAL_API_KEY=xx_xx_xxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Check here for more information about App ID and API Key.

Note

Starting November 14 2024, OneSignal has implemented a new Rich API key system and is deprecating legacy API keys. This package is updated to use the new Rich API key system.

Send a push notification to all subscribers:

use AwaluddinKasim\OneSignalPushNotification\OneSignal;

OneSignal::sendToAll($your_message); 

Send a push notification to specific segments:

use AwaluddinKasim\OneSignalPushNotification\OneSignal;

OneSignal::sendToSegments($your_segments, $your_message);

Send a push notification to a user by external user ID:

use AwaluddinKasim\OneSignalPushNotification\OneSignal;

OneSignal::sendToUsers($external_user_id, $your_message);

$external_user_id can be a string or an array of strings. If an array is given, all the given IDs will receive the notification.

You can read more about External ID here.

License

This package is released under the MIT License.

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固