<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tzurbaev / unisender-notifications-channel example snippets
'unisender' => [
'api-key' => 'KEY_HERE',
],
namespace App\Notifications;
use Illuminate\Notifications\Notification;
use NotificationChannels\Unisender\UnisenderChannel;
use NotificationChannels\Unisender\UnisenderMessage;
class SubscriptionActivatedNotification extends Notification
{
public function via($notifiable)
{
return [UnisenderChannel::class];
}
public function toUnisender($notifiable)
{
return (new UnisenderMessage)
->from('Laravel')
->content('Your subscription is active!');
}
}
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use Notifiable;
public function routeNotificationForUnisender()
{
return '+79641234567'; // or ['+79641234567', '+79831234567'];
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.