alhoqbani/mobily.ws
Composer 安装命令:
composer require alhoqbani/mobily.ws
包简介
Laravel Mobily.ws SMS
关键字:
README 文档
README
Laravel SMS Library
Under Development, Not ready for production.
This is a Laravel package to send SMS using http://mobily.ws.
Installation
- Install the package using Composer:
composer require alhoqbani\mobily.ws
- After updating composer, add the ServiceProvider to the providers array in
config/app.php
Alhoqbani\MobilyWs\MobilyWsServiceProvider::class,
- Publish the configuration file using:
php artisan vendor:publish --provider='Alhoqbani\MobilyWs\MobilyWsServiceProvider'
- In your
.envfile add your mobily.ws login details
MOBILY_WS_MOBILE=
MOBILY_WS_PASSWORD=
MOBILY_WS_SENDER=
Usage
use Alhoqbani\MobilyWs\SMS;
$sms = new SMS();
$sms->text('This is an SMS from Mobily.ws')
->to('9665xxxxxxxx')
->send();
echo $sms->result(); // تمت عملية الإرسال بنجاح
echo $sms->balance(); // 1124
For now, numbers should be entered with the country code without leading zeros or +
Multiple Recipients:
You can also pass an array of numbers to the to() method.
$sms->to(['9665xxxxxxxx', '9665xxxxxxxx']);
Defered SMS
You can define the time to send the message by calling when();
it takes two arguments, date and time. you can pass null to either.
Format must be: dd/mm/yyyy, hh:mm:ss
$sms->text('This is an SMS from Mobily.ws')
->to('9665xxxxxxxx')
->when('10/25/2030', 06:30:00')
->send();
Other Functions:
removeDuplicate() Will remove all duplicate numbers and send notRepeat key to mobily.ws
domain() Adds the domainName to the sent sms.
统计信息
- 总下载量: 44
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-04-18