use Grafstorm\FortySixElksChannel\FortySixElksChannel;
use Grafstorm\FortySixElksChannel\SmsMessage;
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [FortySixElksChannel::class];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return string[]
*/
public function toFortySixElks($notifiable): SmsMessage
{
// Return a SmsMessage. Needs to and message.
// To needs to be formatted as a [E.164](https://en.wikipedia.org/wiki/E.164) phonenumber. (Eg. +4612345678)
return (new SmsMessage())
->from('developer')
->to($notifiable->mobile)
->line('Hello World')
->line('')
->line('Bye world.');
}
use Grafstorm\FortySixElksChannel\SmsMessage;
use Grafstorm\FortySixElksChannel\Facades\FortySixElks;
$message = (new SmsMessage())
->to('+461')
->line('Hello World');
$sms = FortySixElks::create($message)->send();
// Use dryRun() to test sending the message.
$sms = FortySixElks::create($message)->dryRun()->send();