yacinediaf/laravel-notifyme 问题修复 & 功能扩展

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

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

yacinediaf/laravel-notifyme

最新稳定版本:v1.0.4

Composer 安装命令:

composer require yacinediaf/laravel-notifyme

包简介

This is my package laravel-notifyme

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package allows you to notify your users through the firebase cloud messaging technique in order to notify them using there device notification on both IOS or ANDROID with ease.

Before start working with this package it is recommended to read the following article to know how things works under the hood. Notify me! Using Laravel and FCM.

Requirements

You need to have laravel sanctum installed. if you don't installed it yet do it using the following command

composer require laravel/sanctum

Installation

  1. You can install the package via composer:
composer require yacinediaf/laravel-notifyme
  1. You can publish and run the migrations with:
php artisan vendor:publish --tag="migrations"
php artisan migrate

Don't forget to add the hasDevice trait to your User model

  1. Add the FIREBASE_CREDENTIALS to your .env file you can read the following article in order to know where to get this file. Notify me! Using Laravel and FCM.
    FIREBASE_CREDENTIALS=storage/app/private/googleaccountservice.json

Usage

  1. Make sure the current user is authenticated.
  2. Generate the FCM token on the client side from your mobile client (IOS, ADNROID) by installing firebase package compatible with the language you're using for example Flutter.
  3. Save the generated FCM token for the current user with the current device by Posting to this endpoint /api/save_device_token
  4. You need to include in the body parameter of the request the following data:
    [
            'user_id' => ['required', 'exists:users,id'],
            'device_token' => ['required', 'string'],
            'device_info' => ['required', 'string'], //Iphone 15 pro max
    ];

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固