<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
salamwaddah / laravel-smsglobal-notifications-channel example snippets
use Illuminate\Notifications\Notification;
use SalamWaddah\SmsGlobal\SmsGlobalChannel;
use SalamWaddah\SmsGlobal\SmsGlobalMessage;
class OrderPaid extends Notification
{
public function via($notifiable): array
{
return [
SmsGlobalChannel::class,
];
}
public function toSmsGlobal($notifiable): SmsGlobalMessage
{
$message = 'Order paid, Thank you for your business!';
$smsGlobal = new SmsGlobalMessage();
return $smsGlobal->to($notifiable->phone)->content($message);
}
}
Notification::send(
'+971555555555',
new OrderPaid($order)
);
public function toSmsGlobal(string $phoneNumber): SmsGlobalMessage
{
$message = 'Order paid, Thank you for your business!';
$smsGlobal = new SmsGlobalMessage();
return $smsGlobal->to($phoneNumber)->content($message);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.