定制 csgt/notification-channel-goip 二次开发

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

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

csgt/notification-channel-goip

最新稳定版本:v5.8.1

Composer 安装命令:

composer require csgt/notification-channel-goip

包简介

Notification channel GoIP.

README 文档

README

Latest Version on Packagist Software License Total Downloads

This package makes it easy to send [Direkto notifications] with Laravel 5.4.

Contents

Installation

You can install the package via composer:

composer require csgt/notification-channel-goip

You must install the service provider:

// config/app.php
'providers' => [
    ...
    NotificationChannels\GoIP\GoIPProvider::class,
],

Setting up your Direkto account

Add your Direkto Account SID, Auth Token, and From Number (optional) to your config/services.php:

// config/services.php
...
'goip' => [
        'account_url' => env('GOIP_URL'),
    ],
...

Usage

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

use Illuminate\Notifications\Notification;
use NotificationChannels\GoIP\GoIPChannel;
use NotificationChannels\GoIP\GoIPMessage;

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

    public function toDirekto($notifiable)
    {
        return (new DirektoMessage())
            ->content("Your {$notifiable->service} account was approved!");
    }
}

In order to let your Notification know which phone are you sending/calling to, the channel will look for the celular attribute of the Notifiable model. If you want to override this behaviour, add the routeNotificationForDirekto method to your Notifiable model.

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

Available Message methods

GoIPSmsMessage

  • from(''): Accepts a phone to use as the notification sender.
  • content(''): Accepts a string value for the notification body.

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email jgalindo@cs.com.gt instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-21