<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sashalenz / turbosms-notification-channel example snippets
use Illuminate\Notifications\Notification;
use Sashalenz\TurboSms\TurboSmsChannel;
use Sashalenz\TurboSms\TurboSmsMessage;
class OrderShipped extends Notification
{
public function via(object $notifiable): array
{
return [TurboSmsChannel::class];
}
public function toTurboSms(object $notifiable): TurboSmsMessage
{
return new TurboSmsMessage("Your order #{$notifiable->id} has shipped.");
}
}
class User extends Authenticatable
{
use Notifiable;
public function routeNotificationForTurbosms(): string
{
return $this->phone; // '+380501234567' → '380501234567' on the wire
}
}