sagordev/powersms-gateway
Composer 安装命令:
composer require sagordev/powersms-gateway
包简介
A php package for BanglaPhone Power SMS
README 文档
README
The PowerSMS Gateway PHP Package allows you to easily send bulk SMS messages using the Power SMS service provided by Banglaphone Limited. This package is compatible with both Laravel and raw PHP applications, making it versatile for various use cases.
Installation
You can install this package via Composer:
composer require sagordev/powersms-gateway
Laravel Integration
For Laravel integration, follow these additional steps:
Publish the package configuration file:
php artisan vendor:publish --provider="Sagordev\PowersmsGateway\Providers\PowerSmsGatewayServiceProvider"
This will publish the configuration file to config/powersms.php
Add your Power SMS API credentials and configure other settings in the config/powersms.php file:
return [ 'user_id' => 'YOUR_USER_ID', 'password' => 'YOUR_PASSWORD', 'url' => '' // You can keep it blank ];
Usage
Sending SMS
use Sagordev\PowersmsGateway\Facades\PowerSms; PowerSms::message('This is a test SMS', '01234567890')->send(); // You can also send list of numbers (ex: ['01234567890', '01234567891'])
Sending Same SMS to multiple recipients
PowerSms::message('This is test SMS') ->to(['01234567890', '01234567891']) ->send();
Add your number(s) in cc to get a carbon copy of message
PowerSms::message('I am SMS with carbon copy to developer') ->to(['01234567890', '01234567891']) ->cc(['01234567892']) ->send();
Another way to send single SMS to multiple recipients
PowerSms::send([ 'message' => 'Hey, This is another SMS', 'to' => ['01234567890', '01234567891'], ]);
Send Multiple messages to multiple different recipients
PowerSms::send([ [ 'message' => 'Dear Customer, Your invitation code is #3310', 'to' => ['01234567890', '01234567891'], ], [ 'message' => 'Dear Customer, Your invitation code is #0950', 'to' => '01234567892', ] ]);
In your other PHP project
use Sagordev\PowersmsGateway\PowerSms; $config = [ 'user_id' => 'YOUR_USER_ID', 'password' => 'YOUR_PASSWORD', 'url' => '' // You can keep it blank ]; $sms = new PowerSms($config); $sms->message('Hello', '01234567890')->send(); // Example 2 $sms->message('I am SMS with carbon copy to developer') ->to(['01234567890', '01234567891']) ->cc(['01234567892']) ->send(); // Please look at the previous examples for more fun
Support and Issues
If you encounter any issues or have questions about using this package, please feel free to create an issue on the GitHub repository. I am here to help!
License
This package is open-sourced software licensed under the MIT License.
sagordev/powersms-gateway 适用场景与选型建议
sagordev/powersms-gateway 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 6, 最近一次更新时间为 2022 年 08 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sms」 「Power SMS」 「powersms」 「banglaphone」 「commlink」 「bulk sms bangladesh」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sagordev/powersms-gateway 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sagordev/powersms-gateway 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sagordev/powersms-gateway 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Simple, chainable calculation library.
IPBoard API integration with Laravel
SDK for payment gateway PlatbaMobilom.sk for PHP7.0
Extensible library for building notifications and sending them via different delivery channels.
Forma elegante e eficiente de formatar campos de data, hora e afins ao exibir, colocando somente um sufixo no nome original do atributo sem precisar declarar Accessors e/ou Mutators dentro da model
Power BI Embedded is an easy way to obtain the necessary token to build the Power BI Embedded interface
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-21