PHP code example of laravel-notification-channels / vwo-engage
1. Go to this page and download the library: Download laravel-notification-channels/vwo-engage 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/ */
laravel-notification-channels / vwo-engage example snippets
// config/services.php
'vwo-engage' => [
'token' => env('VWO_ENGAGE_API_TOKEN'),
]
use Illuminate\Notifications\Notification;
use NotificationChannels\Engage\EngageChannel;
use NotificationChannels\Engage\EngageMessage;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [EngageChannel::class];
}
public function toEngage($notifiable)
{
return EngageMessage::create()
->subject('Your account was approved!')
->body('Click here to see details.')
->icon('https://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Laravel.svg/231px-Laravel.svg.png')
->url('https://vwo.com/engage');
}
}
public function routeNotificationForEngage()
{
return 'VWO_ENAGE_SUBSCRIBER_ID';
}