use Illuminate\Notifications\Notification;
use NotificationChannels\Textlocal\TextlocalChannel;
use NotificationChannels\Textlocal\TextlocalMessage;
class SendBlackFridaySaleAnnouncement extends Notification
{
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [TextlocalChannel::class];
}
/**
* Get the Textlocal / SMS representation of the notification.
*
* @param mixed $notifiable
* @return NexmoMessage
*/
public function toTextlocal($notifiable)
{
return (new TextlocalMessage())
//Required
// To send sms via your Textlocal promotional account
//or transactional() to sent via Textlocal transactional account
->promotional()
//Optional
//If you don't provide a from, it will pick up the value from the config
->from('TXTLCL')
//Optional
//If you want to send a copy of the sms to another number eg an Admin
->cc('914545454545')
//Required
->content('We are running a BlackFriday sale from tomorrow for 3 days with 40% off. Hurry !!! Grab the opportunity!');
}
}
use Illuminate\Notifications\Notification;
use NotificationChannels\Textlocal\TextlocalChannel;
use NotificationChannels\Textlocal\TextlocalMessage;
class SendLoginOtp extends Notification
{
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [TextlocalChannel::class];
}
/**
* Get the Textlocal / SMS representation of the notification.
*
* @param mixed $notifiable
* @return NexmoMessage
*/
public function toTextlocal($notifiable)
{
return (new TextlocalMessage())
//Required
// To send sms via your Textlocal transactional account
//or promotional() to sent via Textlocal promotional account
->transactional()
//Optional
//If you don't provide a from, it will pick up the value from the config
->from('TXTLCL')
//Optional
//If you want to send a copy of the sms to another number eg an Admin
->cc('914545454545')
//Required
//When sending through Textlocal transactional account, the content must conform to one of your approved templates.
->content('Your OTP for Application is 234567. It is valid for the next 10 minutes only.');
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.