承接 sub100/notifications 相关项目开发

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

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

sub100/notifications

Composer 安装命令:

composer require sub100/notifications

包简介

Sub100 Notifications Laravel SDK

README 文档

README

This package uses Sub100 notification api to send email, sms and whatsapp notifications.

Usage as a composer package in your Laravel project

Install via composer

composer req sub100/notifications

Publish config

php artisan vendor:publish --provider="sub100\Notifications\Sub100NotificationServiceProvider"

Configure .env file

NOTIFICATION_URL=https://path-to-notification/api/
<?php

$message = new Message();
$message->subject('Subject');
$message->mailTemplate('notification.template.dir.filename');
$message->mailVariables(['name' => 'User']);
$message->addEmail('test@example.com.br');

Notification::notify($message);

Usage in another projects

Install via composer

composer req sub100/notifications
<?php

$authToken = '';

$message = new Message();
$message->message('Message text');
$message->addWhatsapp('+55 (44) 91234-5678');

$notification = new Notification('http://notification-api.example.com');

$notification->notify($message, $authToken);

Other Examples

Send Twilio Whatsapp message

<?php

$authToken = '';

$message = new Message();
$message->message('Message text');
$message->addWhatsapp('+55 (44) 91234-5678');
$message->senderServiceType('twilio');
$message->senderServiceCredentials([
    "twilio_auth_token"   => "8b74ff6655248c86fe0813e07d0f58a8",
    "twilio_account_sid"  => "AC16909ae3f38b03c7495d7dfbfd9dcbb4",
    "twilio_from"         => "whatsapp:+14155238886"
]);

$notification = new Notification('http://notification-api.example.com');

$notification->notify($message, $authToken);

Send Email with pre-defined mail body

<?php

$authToken = '';

$message = new Message();
$message->mailBody('<p>Message text</p>');
$message->addEmail('test@example.com.br');

$notification = new Notification('http://notification-api.example.com');

$notification->notify($message, $authToken);

Get notifications history

$authToken = '';

$originId = '';

$clientIds = ['',];

$notificationIds = ['',];

$notification = new Notification('http://notification-api.example.com');

$notification->historyByOrigin($originId, $authToken)

$notification->historyByClientAndOrigin($clientIds, $originId, $authToken);

$notification->historyByNotificationAndOrigin($notificationIds, $originId, $authToken)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固