PHP code example of riotj / osonsms-gateway

1. Go to this page and download the library: Download riotj/osonsms-gateway 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/ */

    

riotj / osonsms-gateway example snippets

 artisan migrate
bash
php artisan vendor:publish --provider="OsonSMS\SMSGateway\SMSGatewayServiceProvider" --tag="migrations"
bash
php artisan vendor:publish --provider="OsonSMS\SMSGateway\SMSGatewayServiceProvider" --tag="config"

$txn_id = uniqid();
$result = SMSGateway::Send('xxxxxxxxx', 'This is my test message from Laravel!', $txn_id);
if ($result)
    echo "SMS has been sent succesfully";
else
    echo "When sending SMS an error occurred";