dev-master
9999999-devA package to send SMS using mobily.ws, smsgw.net API
MIT waqf
The Requires
- php >=5.3.0
laravel mobily.ws smsgw.net
A package to send SMS using mobily.ws, smsgw.net API
A Laraval Package to send sms messages. It supports multiple sms gateways, and easily extendable to support new gateways. The default cofing supports mobily.ws and smsgw.net , and you can easily add any other gateway ( see Defining new gateways ), (*1)
Install with composer by running composer require abdullahobaid/sms:dev-master
Composer will download and install the package. if you are using Laravel > 5.5 go directly to Config
if you are using laravel < 5.4 ONLY
open config/app.php
and add the service provider and alias as below:, (*2)
'providers' => array( ... abdullahobaid\sms\SmsProvider::class, ), . . . 'aliases' => array( ... 'SMS' => abdullahobaid\sms\SMS::class, ),
Publish the configuration file by running the following Artisan command., (*3)
$ php artisan vendor:publish --provider="abdullahobaid\sms\SmsProvider"
Finally, you need to edit the configuration file at config/sms.php
with your own gateway info. Also you need to set your default Gateway at the top of the config file., (*4)
SMS::Balance($gatewayName = false);
Returns the current balance for the default gateway or for the giving one., (*5)
SMS::Send($numbers,$message,$dateTime=false,$senderName=false,$gatwayName=false);
You can pass a single number or array of numbers, see examples below:, (*6)
The message text, (*7)
dateTime format Y-m-d H:i:s
, (*8)
Override default sender name, (*9)
Override default gateway, (*10)
Will send the message directly to the number, (*11)
SMS::Send(966555555555, 'Your Message Here');
Returns true
if the message is sent, false
if not., (*12)
Pass an array of numbers instead of a single number to send to all of them, (*13)
$numbers = array('966555555555','966545555555','966565555555'); SMS::Send($numbers, 'Your Message Here');
Returns true
if the message is sent, false
if not., (*14)
Will send the message in a desired date and time, (*15)
SMS::send(966555555555, 'Your Message Here', $dateTime);
Y-m-d H:i:s
true
if the message is sent, false
if not.SMS::Balance();
Returns user's balance., (*16)
SMS::count_messages($text);
SMS::Send(966555555555, 'Your Message Here', $dateTime=false,'SenderName');
Note that the new sender should be registered and activate at mobily.ws website, (*17)
Waqf General Public Licens, (*18)
A package to send SMS using mobily.ws, smsgw.net API
MIT waqf
laravel mobily.ws smsgw.net