定制 daemon144key/zenziva-notification-channel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

daemon144key/zenziva-notification-channel

最新稳定版本:1.0.0

Composer 安装命令:

composer require daemon144key/zenziva-notification-channel

包简介

Zenziva SMS notifications driver.

README 文档

README

Latest Version on Packagist Software License Build Status StyleCI Total Downloads

This package makes it easy to send SMS notifications using zenziva.id with Laravel 5.3 onward.

Contents

Installation

You can install the package via composer:

composer require daemon144key/zenziva-notification-channel

You must install the service provider and add to your config/app.php (skip for Laravel 5.5 onward):

// config/app.php
'providers' => [
    ...
    TuxDaemon\ZenzivaNotificationChannel\ZenzivaServiceProvider::class,
],

Additionally you can add related facade in config/app.php :

// config/app.php
'aliases' => [
    ...
    'ZenzivaClient' => TuxDaemon\ZenzivaNotificationChannel\Facades\ZenzivaFacade::class,
],

Setting up the zenziva-notification-channel service

Add your Zenziva account userkey and passkeyto your config/services.php:

// config/services.php
...
'zenziva' => [
    'userkey' => env('ZENZIVA_SMS_CLIENT_USERKEY', ''),
    'passkey' => env('ZENZIVA_SMS_CLIENT_PASSKEY', ''),
    'masking' => env('ZENZIVA_SMS_CLIENT_MASKING', false)
],
...

Usage

You can use the channel in your via() method inside the notification:

use Illuminate\Notifications\Notification;
use TuxDaemon\ZenzivaNotificationChannel\ZenzivaMessage;
use TuxDaemon\ZenzivaNotificationChannel\ZenzivaChannel;

class OrderCreated extends Notification
{
    public function via($notifiable)
    {
        return [ZenzivaChannel::class];
    }

    public function toZenziva($notifiable)
    {
        return ZenzivaMessage::create("Your order had created!");
    }
}

Or call the function from facade :

use ZenzivaClient;

class Something
{
    public function send($to, $msg)
    {
        return ZenzivaClient::send("081234567890", "hello world");
    }

    public function checkBalance()
    {
        return ZenzivaClient::checkBalance();
    }
}

Or from CLI artisan command :

$ php artisan zenziva:send 081234567890 "hello world"
$ php artisan zenziva:checkbalance

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please use the issue tracker.

Contributing

Please see CONTRIBUTING for details.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固