Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Charrua's avatar

Sending SMS notification to multiple user phone numbers

Hello, each of my User model have two phone numbers on the users table, phone_num and secondary_phone_num. For SMS I'm using Twilio notifications channel

On my model I have included the method

/**
 * Route notifications for the Twilio channel.
 *
 * @return string
 */
 public function routeNotificationForTwilio(){ 

    return $this->phone_num;

}

Each time I send a notification, this sends it without any problem. But what about if I wanted to send the notification to both phone numbers?

The same applies to emails, I send also an email notification, but what if the user has more than an email and wanted to be sent the notification to both emails?

Any ideas on how to solve this issue? Thank you.

0 likes
2 replies
Charrua's avatar

Good idea, but I'm sending notifications using the Notification facade for sending 1000 notifications at once.

Notification::send($users, new Announcement($message));

Any ideas on implementing your idea and what I'm using now? Or maybe a different approach? Thank you

Please or to participate in this conversation.