ibtdi / hisms
发送短信 - 使用 hisms.ws : 短信提供商
1.0.0
2021-10-19 17:04 UTC
Requires
- php: >=7.2
- ext-json: *
Requires (Dev)
- guzzlehttp/guzzle: ^7.0
- orchestra/testbench: ^6.21
README
ibtdi/hisms 包提供了一种流畅的接口,在您的 PHP 应用程序中使用 HISMS 发送短信。
HISMS 简介
我们可以使用仅允许沙特阿拉伯电话号码的 HISMS 短信服务提供商发送短信。
支持号码列表
安装
您可以通过 composer 安装此包
composer require ibtdi/hisms
用法
- 安装包后,运行安装命令
php artisan hisms:install
或者
vendor:publish --provider="Ibtdi\HiSms\HISmsServiceProvider" --tag="config"
- 设置您的环境变量 - 请参阅
config/hisms.php - 发送第一条短信
HiSms::to(['9665 xxx xxxx','9665 xxx xxxx'])
->message('hello world')
->send();
就这样...
- 如果您想以其他方式获取一些响应,可以这样做
$response=HiSms::to(['9665 xxx xxxx','9665 xxx xxxx'])
->message('hello world')
->send()
->andGetMessage();
- 还有其他函数可以单独获取信息,而不是链式调用
andGetStatusandGetCode
$response=HiSms::to(['9665 xxx xxxx','9665 xxx xxxx'])
->message('hello world')
->send()
->andGetStatus();
$response=HiSms::to(['9665 xxx xxxx','9665 xxx xxxx'])
->message('hello world')
->send()
->andGetCode();
andGetStatus : boolandGetMessage : stringandGetCode : int
变更日志
请参阅 CHANGELOG 以获取更多信息,了解最近有哪些变化。
测试
phpunit
贡献
请参阅 CONTRIBUTING 以获取详细信息。
安全
如果您发现任何安全相关的问题,请通过电子邮件 mohamednasrali00@gmail.be 而不是使用问题跟踪器。
许可证
MIT 许可证 (MIT)。请参阅 许可证文件 以获取更多信息。