<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
webxscripts / laravel-smsapi-notification-channel example snippets
use Illuminate\Notifications\Notification;
use WebXScripts\SmsApiNotification\SmsApiMessage;
class OrderConfirmation extends Notification
{
public function __construct(private string $orderNumber) {}
public function via($notifiable): array
{
return ['smsapi'];
}
public function toSmsApi($notifiable): SmsApiMessage
{
return SmsApiMessage::create("Order #{$this->orderNumber} confirmed.")
->from('MyShop');
}
}