<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
safermobility / laravel-notification-channel-twilio example snippets
public function routeNotificationForTwilio()
{
return '+1234567890';
}
/config/twilio-notification-channel.php
php
use NotificationChannels\Twilio\TwilioChannel;
use NotificationChannels\Twilio\TwilioSmsMessage;
use Illuminate\Notifications\Notification;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [TwilioChannel::class];
}
public function toTwilio($notifiable)
{
return (new TwilioSmsMessage())
->content("Your {$notifiable->service} account was approved!");
}
}
php
use NotificationChannels\Twilio\TwilioChannel;
use NotificationChannels\Twilio\TwilioMmsMessage;
use Illuminate\Notifications\Notification;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [TwilioChannel::class];
}
public function toTwilio($notifiable)
{
return (new TwilioMmsMessage())
->content("Your {$notifiable->service} account was approved!")
->mediaUrl("https://picsum.photos/300");
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.