承接 semantechs/notification 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

semantechs/notification

最新稳定版本:v2.1.5

Composer 安装命令:

composer require semantechs/notification

包简介

Notification agent to handle all kind of notification with pusher

README 文档

README

Open composer.json and add following line

"autoload": {

    ....

    "psr-4": {

        ....

        "Sementechs\\Notification\\": "vendor/semantechs/notification/src/"

    }

},

Open app.php in config folder and add following line

'providers' => ServiceProvider::defaultProviders()->merge([

    ....

    Sementechs\Notification\NotificationServiceProvider::class,

])->toArray(),

Place your firebase service account file in storage folder and add file name in .env file

FIREBASE_CREDENTIALS=file_name.json

BROADCAST_DRIVER=puhser

PUSHER_APP_ID=

PUSHER_APP_KEY=

PUSHER_APP_SECRET=

PUSHER_HOST=

PUSHER_PORT=443

Run following commands

composer dump-autoload

php artisan vendor:publish --tag=laravel-assets

php artisan migrate

Available Methods

  1. Send Notification

$notificationObject = [ 'sender_id' => 1, 'receiver_ids' => [ 1, 2, 3 ], 'channel' => 'web', // web, mobile 'body' => [ 'title' => 'Title', 'body' => 'Detail' ], 'type' => 'admin' // admin, user ];

NotificationController::sendNotification($notificationObject);

  1. Get All Notification

$type = web/user

NotificationController::getAllNotifications($type, $userId)

  1. Read All Notifications

$data = objects of all notifications

NotificationController::readAll($data)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-08