定制 fomvasss/laravel-notification-channel-turbo-sms 二次开发

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

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

fomvasss/laravel-notification-channel-turbo-sms

最新稳定版本:1.5.1

Composer 安装命令:

composer require fomvasss/laravel-notification-channel-turbo-sms

包简介

This package makes it easy to send notifications using [turbosms.ua](https://turbosms.ua) with Laravel 5.5+

README 文档

README

Here's the latest documentation on Laravel's Notifications System:

https://laravel.com/docs/master/notifications

Latest Version on Packagist Software License Quality Score Code Coverage Total Downloads

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

Contents

Installation

Install this package with Composer:

composer require fomvasss/laravel-notification-channel-turbo-sms

The service provider gets loaded automatically. Or you can do this manually:

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

Setting up the TurboSms service

Add your TurboSms token, default sender name (or phone number), test mode to your config/services.php:

// config/services.php ... 'turbosms' => [ 'api_token' => env('TURBOSMS_API_TOKEN'), 'sender' => env('TURBOSMS_SENDER'), // for test sending use TAXI  'is_test' => env('TURBOSMS_IS_TEST'), // optional 'timeout' => env('TURBOSMS_TIMEOUT'), 'connect_timeout' => env('TURBOSMS_CONNECT_TIMEOUT'), ], ...

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 (new TurboSmsMessage())->content("Hello SMS!!!")->test(true); } }

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

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

Available methods

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

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

time(): Example argument = time() + 7*60*60 - Postpone shipping for 7 hours.

test(): Test SMS sending (log)

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固