phpawcom/ismartsms
最新稳定版本:1.0.0
Composer 安装命令:
composer require phpawcom/ismartsms
包简介
Send SMS via iSmartSMS gateway (Oman)
README 文档
README
This basic library help you to send SMS via ismartsms.net (Oman)
Installation:
composer require phpawcom/ismartsms
In your .env, add the following:
ISMARTSMS_USER_ID="Your ismartsms API username" ISMARTSMS_PASSWORD="Your Password"
publish config:
This is an optional step, not really needed if you are using .env for configuration
php artisan vendor:publish --provider "S4D\Laravel\IsmartSMS\IsmartSMSProvider"
The S4D\Laravel\IsmartSMS\IsmartSMSProvider is auto-discovered and registered by default. If you want to register it yourself, add the ServiceProvider in config/app.php:
'providers' => [ S4D\Laravel\IsmartSMS\IsmartSMSProvider::class, ]
For alias:
'aliases' => [ S4D\Laravel\IsmartSMS\IsmartSMS::class, ]
Usage:
Example code:
if(IsmartSMS::SendSMS('{8 digits phone number}', '{SMS Content}')){ // TODO: SMS has been sent, some action here }else{ // TODO: SMS couldn't be sent, some action here }
If you want to see the result of SMS gateway:
print_r(IsmartSMS::getRawResults());
You can add setFlashSMS() if you want the SMS to disappear after reading:
IsmartSMS::setFlashSMS()->SendSMS('{8 digits phone number}', '{SMS Content}')
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-25