lbhurtado/engagespark 问题修复 & 功能扩展

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

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

lbhurtado/engagespark

最新稳定版本:v3.8

Composer 安装命令:

composer require lbhurtado/engagespark

包简介

This package makes it easy to send SMS notifications and topups via engageSPARK with Laravel.

README 文档

README

Latest Version on Packagist Build Status Quality Score Total Downloads

Installation

You can install the package via composer:

composer require lbhurtado/engagespark
php artisan notifications:table
php artisan migrate

required environment variables:

ENGAGESPARK_API_KEY=
ENGAGESPARK_ORGANIZATION_ID=

optional environment variables:

ENGAGESPARK_SENDER_ID=
ENGAGESPARK_SMS_WEBHOOK=
ENGAGESPARK_AIRTIME_WEBHOOK=
NOTIFICATION_CLASS=
ENGAGESPARK_MIN_TOPUP=

optional configuration:

php artisan vendor:publish --provider="LBHurtado\EngageSpark\EngageSparkServiceProvider"

Usage

in your notification:

use LBHurtado\EngageSpark\EngageSparkChannel;
use LBHurtado\EngageSpark\EngageSparkMessage;

public function via($notifiable)
{
    return [EngageSparkChannel::class];
}
 
public function toEngageSpark($notifiable)
{
    return (new EngageSparkMessage())
        ->content('The quick brown fox jumps over the lazy dog.')
        ;
}   

in your notifiable model:

use Illuminate\Notifications\Notifiable;

public function routeNotificationForEngageSpark()
{
    return $this->mobile;
} 

or use the trait:

use LBHurtado\EngageSpark\Traits\HasEngageSpark;

class Contact extends Model 
{
    use HasEngageSpark;
}

in your application:

use LBHurtado\EngageSpark\Notifications\Topup
use LBHurtado\EngageSpark\Notifications\Adhoc;

$user->notify(new Adhoc('The quick brown fox...'));
$user->notify(new Topup(25);

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email lester@hurtado.ph instead of using the issue tracker.

Credits

License

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

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固