1. Go to this page and download the library: Download usmsgh/usmsgh-api-sdk 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/ */
public function routeNotificationForUsmsgh(Notification $notification)
{
return $this->phone_number;
}
$client = new Urhitech\Usms;
$api_key = "Enter Your API Key here";
$url = "https://webapp.usmsgh.com/api/sms/send";
$recipients = "233500000000,233540000000";
$message = "Hello world";
$senderid = "Enter your approved sender ID here";
$response = $client->send_sms($url, $api_key, $senderid, $recipients, $message);
$api_key = "Enter Your API TOKEN here";
$url = "https://webapp.usmsgh.com/api/balance";
$get_credit_balance = $client->check_balance($url, $api_key);
$api_key = "Enter Your API Key here";
$url = "https://webapp.usmsgh.com/api/me";
$get_profile = $client->profile($url, $api_key);
php
use Urhitech\Umsmgh\UsmsChannel;
use Urhitech\Umsmgh\UsmsMessage;
use Illuminate\Notifications\Notification;
class ProjectCreated extends Notification
{
public function via($notifiable)
{
return [UsmsChannel::class]; // or 'usmsgh'
}
public function toUsms($notifiable)
{
return new UsmsMessage('Content');
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.