承接 stepovenko/laravel-notification-channel-turbosms 相关项目开发

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

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

stepovenko/laravel-notification-channel-turbosms

Composer 安装命令:

composer require stepovenko/laravel-notification-channel-turbosms

包简介

Turbo SMS Notification channel for Laravel 5.3+.

README 文档

README

Based on github.com/laravel-notification-channels/smsc-ru

This package made for send notifications using turbosms.ua with Laravel 5, 6, 7.

Contents

Installation

You can install the package via composer: composer require yakimka/laravel-notification-channel-turbosms

For Laravel < 5.5 you must install the service provider:

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

Setting up the TurboSms service

Add your TurboSms login, secret key (hashed password) and default sender name (or phone number) to your config/services.php:

// config/services.php
...
'turbosms' => [
    'login' => env('TURBOSMS_LOGIN'),
    'secret' => env('TURBOSMS_SECRET'),
    'sender' => 'John Doe',
    'url' => 'http://turbosms.in.ua/api/wsdl.html',
],
...

Usage

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

use Illuminate\Notifications\Notification;
use NotificationChannels\TurboSms\TurboSmsMessage;
use NotificationChannels\TurboSms\TurboSmsChannel;

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

    public function toTurboSms($notifiable)
    {
        return TurboSmsMessage::create("Task #{$notifiable->id} is complete!");
    }
}

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

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

Available methods

from(): Sets the sender's name or phone number.

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

Security

If you discover any security related issues, please email ss.yakim@gmail.com 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.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固