<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shafimsp / laravel-sms-notification-channel example snippets
return [
/*
|--------------------------------------------------------------------------
| The default SMS Driver
|--------------------------------------------------------------------------
|
| The default sms driver to use as a fallback when no driver is specified
| while using the SMS.
|
| Supported: "nexmo", "log", "null"
|
*/
'default' => env('SMS_DRIVER', 'log'),
/*
|--------------------------------------------------------------------------
| Log Channel
|--------------------------------------------------------------------------
|
| If you are using the "log" driver, you may specify the logging channel
| if you prefer to keep mail messages separate from other log entries
| for simpler reading. Otherwise, the default channel will be used.
|
*/
'log_channel' => env('SMS_LOG_CHANNEL'),
];
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['sms'];
}
/**
* Get the SMS representation of the notification.
*
* @param mixed $notifiable
* @return string
*/
public function toSms()
{
return 'Your message content goes here';
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return string
*/
public function toSms()
{
return (new SmsMessage())
->content('Your message goes here');
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return string
*/
public function toSms()
{
return (new SmsMessage())
->content('Your message goes here')
->unicode();
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return string
*/
public function toSms()
{
return (new SmsMessage())
->content('Your message goes here')
->unicode();
}
/**
* Route notifications for the Nexmo channel.
*
* @param \Illuminate\Notifications\Notification $notification
* @return string
*/
public function routeNotificationForSms($notification)
{
return $this->phone;
}