tekkenking/swissecho
最新稳定版本:0.7.1
Composer 安装命令:
composer require tekkenking/swissecho
包简介
A multigateway laravel SMS notification channel package
README 文档
README
Swissecho is a Laravel SMS notification channel package that provides a convenient way to send SMS messages through various gateways. This package is designed to be flexible, allowing you to customize the message content, recipient, sender, and gateway.
Installation
To install the Swissecho package, simply require it via Composer:
composer require tekkenking/swissecho
Laravel Version Compatibility
For Laravel 5.5 and above, the package should be automatically discovered. For Laravel versions below 5.5, you may need to add the service provider to your config/app.php file:
'providers' => [ // ... Tekkenking\Swissecho\SwissechoServiceProvider::class, ],
Basic Usage
The following are different ways to use the Swissecho package:
General Usage
Swissecho::route('sms', function($ms) { return $ms->to('XXXXXXXXXXXX, XXXXXXXXXXXX ') ->content('Wonders shall never end') ->line('Hello world'); //->gateway('routemobile') //optional //->sender('SimbooBiz'); //optional }) ->to('XXXXXXXXXXXX') //optional ->sender('Smart') //optional ->gateway('termii') //optional ->go();
Use Case 1 (SMS)
swissecho()->route('sms', function($ms) { return $ms->to('XXXXXXXXXXXX, XXXXXXXXXXXX ') ->content('Wonders shall never end') ->line('Hello world'); //->gateway('routemobile') //optional //->sender('SimbooBiz'); //optional }) ->to('XXXXXXXXXXXX') //optional ->sender('Smart') //optional ->gateway('termii') //optional ->go();
Use Case 2
swissecho()->quick('XXXXXXXXXXXX', "My name is bola");
Use Case 3 (Slack)
swissecho()->message("Hello world") ->to('XXXXXXXXXXXX') //->sender('Raimi') //->gateway('termii') ->route('slack') ->go();
Use Case 4 (Vonage)
swissecho()->gateway('vonage')->quick('XXXXXXXXXXXX', "My name is bola");
Use Case 5 (Termii)
$sw = swissecho(); //$sw->mockNotifiable($user); $sw->gateway('termii'); $sw->to = "XXXXXXXXXXXX"; $sw->sender = "AXIX"; $sw->message = "The world is a beauty place created by GOD"; $sw->go();
Feel free to customize the examples based on your specific use case and requirements.
License
This package is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 434
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-10