Package Data | |
---|---|
Maintainer Username: | AbdullahObaid |
Maintainer Contact: | imobde3@gmail.com (Abdullah Obaid) |
Package Create Date: | 2016-10-10 |
Package Last Update: | 2019-10-25 |
Language: | PHP |
License: | waqf |
Last Refreshed: | 2024-11-14 15:08:41 |
Package Statistics | |
---|---|
Total Downloads: | 5,410 |
Monthly Downloads: | 18 |
Daily Downloads: | 1 |
Total Stars: | 10 |
Total Watchers: | 2 |
Total Forks: | 3 |
Total Open Issues: | 0 |
A Laraval Package to send SMS using mobily.ws by using it's API and cURL. It uses UTF-8 endconding for the SMS.
new
Supports any number format see Usage
Install with composer by running composer require abdullahobaid/mobilywslaraval:dev-master
Composer will download and install the package. After the package is downloaded,
open config/app.php
and add the service provider and alias as below:
'providers' => array(
...
abdullahobaid\mobilywslaraval\MobilywsProvider::class,
),
.
.
.
'aliases' => array(
...
'Mobily' => abdullahobaid\mobilywslaraval\Mobily::class,
),
Publish the configuration file by running the following Artisan command.
$ php artisan vendor:publish --provider="abdullahobaid\mobilywslaraval\MobilywsProvider"
Finally, you need to edit the configuration file at config/mobilysms.php
with your own mobily.ws account info
return [
'sender' => '', // Mobily.ws Sender Name
'mobile' => '', // Mobily.ws Account Mobile (Username)
'password' => '', // Mobily.ws Password
'deleteKey' => 541235,
'resultType' => 1,
'viewResult' => 1,
'MsgID' => rand(00000,99999),
];
Mobily.ws requires the number to be formated as international number without trailing zeros, but this Package can handle differnt number formats.
You can pass a single number or array of numbers, see examples below:
Will send the message directly to the number
Mobily::send(966555555555, 'Your Message Here');
Returns true
if the message is sent, false
if not.
Pass an array of numbers instead of a single number to send to all of them
$numbers = array('966555555555','966545555555','966565555555');
Mobily::send($numbers, 'Your Message Here');
Returns true
if the message is sent, false
if not.
Will send the message in a desired date and time
Mobily::send(966555555555, 'Your Message Here', $date, $time);
mm/dd/yyyy
hh:mm:ss
true
if the message is sent, false
if not.Mobily::Balance();
Returns user's balance.
Mobily::count_messages($text);
Mobily::send(966555555555, 'Your Message Here', $date=0, $time=0,'Sender Name');
Note that the new sender should be registered and activate at mobily.ws website
Waqf General Public Licens