通知 / 系统通知
系统通知包
dev-Master
2024-01-03 10:04 UTC
Requires
- php: ^7.3|^8.0
- edwinhoksberg/php-fcm: ^1.2
This package is not auto-updated.
Last update: 2024-09-25 13:28:52 UTC
README
数据库操作
包为 Laravel 模型提供了一个处理数据库操作和跟踪用户活动的特质。它将自动填充数据库列并简化用户跟踪功能的实现。
安装
要安装 系统通知
包,请按照以下步骤操作
-
确保您已在您的计算机上安装了 Composer。
-
打开您的终端并导航到您的 Laravel 项目的目录。
-
运行以下命令来安装包
composer require notifications/system-notifications
- 运行以下命令来发布名为 "fcm.php" 的配置文件
php artisan vendor:publish --provider="SystemNotifications\SystemNotificationsServiceProvider" --tag=system-notifications-config
- 在您的 Env 文件中添加 Firebase 配置
FCM_SERVER_KEY=your_firebase_key FCM_SENDER_ID=your_firebase_sender_id
- 包安装后,Laravel 将自动发现该包并注册其服务提供者。
使用方法
$variable['password'] = "testPassword@123"; $variable['firstname'] = "Arslan Ayoub"; $variable['email'] = "arsalanayoub48@gmail.com"; NotificationHelper::initializeNotification(SEEKER , 252,"NewAccountPassword",$variable);