承接 vikki-user/turbosms 相关项目开发

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

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

vikki-user/turbosms

Composer 安装命令:

composer require vikki-user/turbosms

包简介

TurboSMS Notification notifications driver for Laravel 5.7+.

README 文档

README

Software License Build Status StyleCI

This package makes it easy to send notifications using turbosms.ua with Laravel 5.7+.

Contents

Installation

You can install the package via composer:

composer require laravel-notification-channels/turbosms

Thanks to Package Auto-Discovery In Laravel 5.5 you don't need to install the service provider manually.

Setting up the TurboSMS service

Initial steps:

Add your TurboSMS user, password and sender to your config/services.php:

// config/services.php
...
'turbosms' => [
    'login'  => env('TURBOSMS_LOGIN'),
    'password' => env('TURBOSMS_PASSWORD'),
    'sender' => env('TURBOSMS_SENDER'), // optional
],
...

Usage

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

use Illuminate\Notifications\Notification;
use NotificationChannels\TurboSms\{
    TurboSmsMessage, TurboSmsChannel
};

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

    public function toTurboSms( $notifiable ) : TurboSmsMessage
    {
        return ( new TurboSmsMessage() )
            ->content( 'Your {$notifiable->service} account was approved!' )
            ->sender( 'Sender' )
            ;
    }
}

In your notifiable model, make sure to include a routeNotificationForTurboSms() method, which return the phone number or array of phone numbers.

public function routeNotificationForTurboSms()
{
    return $this->phone;
}

Available methods

TurboSmsClient

getLastResults(): get array of notification's GUID styled ID.

TurboSmsMessage

content(): sets a content of the notification message.

getContent(): gets a content of the notification message.

sender(): sets the sender's name (or phone number as name).

getSender(): gets the sender's name.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email aia@auge.in.ua 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.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固