1. Go to this page and download the library: Download aasanakey/smsonline 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/ */
use Illuminate\Notifications\Notification;
use Aasanakey\Smsonline\SmsonlineSmsMessage;
class SMSNotification extends Notification
{
public function via($notifiable)
{
return ['smsonlinegh'];
}
public function toSmsonline($notifiable)
{
return (new SmsonlineSmsMessage)
->sender('Sender ID')
->content('Your account was approved!')
->personalisedValues("List of data for personnalised message content"); // call this method if content has message variables placeholders
}
}
use Aasanakey\Smsonline\Sms;
$sms = new Sms();
$balance = $api->balance(); // returns balance info object
$amount = $balance->ammount // returns balance ammount
$currencyName = $balance->currencyName // returns the balance currency name
$currencyCode = $balance->currencyCode // return the balance ccurrency code