1. Go to this page and download the library: Download pyaesone17/sms-poh 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/ */
php
$results = send_smspoh(
['+959790646062','+95943160544'],
'Nice to meet you'
);
php
class SendSmsPohNotification extends Notification
{
use Queueable;
public $message;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($message)
{
$this->message = $message;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [pyaesone17\SmsPoh\SmsPohChannel::class];
}
/**
* Get the sms representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toMMSms($notifiable)
{
return [
'message' => $this->message,
'to' => '+959790646062',
'test' => 1,
'callback' => function (...$result)
{
// After sms is being sent or failed
// The callback will fire, here you can
// do whatever you want with the result.
// If you don't want, just pass as null
dd($result);
}
];
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.