PHP code example of guiigaspar / laravel-zenvia-channel
1. Go to this page and download the library: Download guiigaspar/laravel-zenvia-channel 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/ */
guiigaspar / laravel-zenvia-channel example snippets
public function routeNotificationForZenvia()
{
return '+5511912345678';
}
/config/zenvia-notification-channel.php
php
use NotificationChannels\LaravelZenviaChannel\ZenviaChannel;
use NotificationChannels\LaravelZenviaChannel\ZenviaSmsMessage;
use Illuminate\Notifications\Notification;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [ZenviaChannel::class];
}
public function toZenvia($notifiable)
{
return (new ZenviaSmsMessage())
->content("Your order {$notifiable->orderId} was approved!");
}
}