laravel-notification-channels / twilio

Twilio notifications channel for Laravel

Home Page:https://laravel-notification-channels.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Queued SMS notification fails to send sms but send the mail.

anushrimathur opened this issue · comments

Queued SMS notification fails to send sms when we use this channel. Anyone who implemented it please help to sort that out.

Can you post the errors you are having?

@atymic A am also experiencing this issue.

public function via($notifiable)
{
$isMail = $notifiable->notification_preference === 'mail';
return $isMail ? ['mail'] : [TwilioChannel::class];
}

every time when you add implements ShouldQueue
the [TwilioChannel::class] won't work but if you remove the implements ShouldQueue
it works

@ronssij How are you triggering the notification? On-demand?

Hi @anushrimathur It seems use SerializesModels was the solution, I tried it and it's working.

It will be helpful to add this on the docs for future reference.

Got the solution from here