PHP code example of zymawy / sms2net

1. Go to this page and download the library: Download zymawy/sms2net library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zymawy / sms2net example snippets


λ composer 
 
'providers' => [
/*
* Package Service Providers...
*/
Zymawy\Sms2Net\Sms2NetServiceProvider::class,
..Rest of Services
]

/*
 Class Aliases
*/
'aliases' => [
'Sms2Net' => \Zymawy\Sms2Net\Facades\Sms2NetFacade::class,
..Rest of Services
]

λ php artisan vendor:publish --provider="Zymawy\Sms2Net\Sms2NetServiceProvider"

$msg =  'In The Name Of Allah The Merciful';
$numbers = [
    '009665900000000',
    '0540000000',
    '+966550000000'
];
    
$response = Sms2Net::sendToMany($numbers,$msg);

$msg =  'In The Name Of Allah Most Merciful';
$user = App\User::first();
$response = Sms2Net::sendToMany($user->phone_number,$msg);

$balance = Sms2Net::geBalance();
return $balance;

Sms2Net::getMessages(); 

Sms2Net::contactUs('[email protected]', 'A Test Message'); 

Sms2Net::getGroups(); 

$groupID = 212312;
Sms2Net::getGroup($groupID);

Sms2Net::phoneBook();

Sms2Net::sender();