// 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'),
// The url Plivo will request to notify about changing sms statuses
'webhook' => ''
],
use Illuminate\Notifications\Notification;
use NotificationChannels\Plivo\PlivoChannel;
use NotificationChannels\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.