public function routeNotificationForInfobip()
{
return '+1234567890';
}
use App\Notifications\ExampleInfobipNotification;
use Illuminate\Support\Facades\Notification;
Notification::send($user, new ExampleInfobipNotification());
// where $user implements `Illuminate\Notifications\Notifiable` trait
use App\Notifications\ExampleInfobipNotification;
$user->notify(new ExampleInfobipNotification($invoice));
namespace App\Notifications;
use Illuminate\Notifications\Notification;
use NotificationChannels\Infobip\InfobipChannel;
use NotificationChannels\Infobip\InfobipMessage;
class ExampleInfobipNotification extends Notification
{
public function via($notifiable)
{
return [InfobipChannel::class];
}
public function toInfobip($notifiable)
{
return (new InfobipMessage())
// Customize your msg content here
->content("Your {$notifiable->service} account was approved!");
}
}
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use Notifiable;
}
php
use NotificationChannels\Infobip\InfobipChannel;
use NotificationChannels\Infobip\InfobipMessage;
use Illuminate\Notifications\Notification;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [InfobipChannel::class];
}
public function toInfobip($notifiable)
{
return (new InfobipMessage())
->content("Your {$notifiable->service} account was approved!");
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.