1. Go to this page and download the library: Download vaibhavpandeyvpz/msg91 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/ */
$result = Msg91::retry('919999999999', true); // returns true or false
$result = Msg91::verify('919999999999', 1290); // returns true or false
/**
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['msg91'];
}
use Msg91\Laravel\Notification\Message as Msg91Message;
public function toMsg91()
{
return (new Msg91Message)
->message(__('This is just a test message.'))
->sender('MSGIND')
->transactional()
->options([
'DLT_TE_ID' => '<dlt-registered-templated-id>',
]);
}
public function routeNotificationForMsg91($notification)
{
return $this->phone;
}
$notifiable = /* some class */
$notifiable->notify(new App\Notifications\Msg91TestNotification());
use Illuminate\Support\Facades\Notification;
Notification::route('msg91', '919999999999')
->notify(new App\Notifications\Msg91TestNotification());