Sulieman
4 years ago
541
16
Laravel

sending more than 10,000 sms

Posted 4 years ago by Sulieman

hello , i'm working on project with laravel that will send sms to many contacts, the contacts more than 10,000 , and i am using nexmo or twilio, they have good api ,but my question is what the best salution to do that ::

is to insert 10,000 job in the queue, esh job will send 1 sms ??

$contact = Contacts::all();
foreach ($contacts as $contact) {
    $this->dispatch(new SendSMS($contact)); 
}

or make it run without queue

$contact = Contacts::all();
foreach ($contacts as $contact) {
    $contact->sendSMS();
}

what is the best saluotion ? if there another one ?

Please sign in or create an account to participate in this conversation.