<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
codemonkey76 / plivo-notification-channel example snippets
// config/services.php
...
'plivo' => [
'auth_id' => env('PLIVO_AUTH_ID'),
'auth_token' => env('PLIVO_AUTH_TOKEN'),
// Country code, area code and number without symbols or spaces
'from_number' => env('PLIVO_FROM_NUMBER'),
],
use Illuminate\Notifications\Notification;
use Codemonkey76\Plivo\PlivoChannel;
use Codemonkey76\Plivo\PlivoMessage;
public function via($notifiable)
{
return [PlivoChannel::class];
}
public function toPlivo($notifiable)
{
return (new PlivoMessage)
->content('This is a test SMS via Plivo using Laravel Notifications!');
}
public function routeNotificationForPlivo()
{
// Country code, area code and number without symbols or spaces
return preg_replace('/\D+/', '', $this->phone_number);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.