ridhopujiono/fcm-send-notification 问题修复 & 功能扩展

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

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

ridhopujiono/fcm-send-notification

Composer 安装命令:

composer require ridhopujiono/fcm-send-notification

包简介

This makes it easier for you to send notifications with FCM. be it sending personally or to all users

README 文档

README

composer require ridhopujiono/fcm-send-notification

Before Usage

You must insert a new column for the User model

php artisan make:migration add_device_token_to_users

After run that command, open the migration and edit into this

Schema::table('users', function (Blueprint  $table) {
    $table->string('device_token')->nullable();
});

Do Migrate

php artisan migrate

Set env file

  • Open your .env file

  • Add new line in bottom and do add code like this

    SERVER_KEY_FCM='YOUR SERVER KEY FROM FIREBASE'

Notice :

you have to fill in the device token field yourself. somehow. because in general to retrieve the device token a client-side language is needed (such as Javascript)

Usage

Use first

use RidhoPujiono\FcmSendNotification;

Send notification to all user

FcmSendNotification::sendNotificationAll($title, $body, $urlClick);

Send notification to specific user

FcmSendNotification::sendNotificationSingle($user_id, $title, $body);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固