Twilio sms not handling exception

276
December 15, 2018, at 6:10 PM

My application sends an sms message when a user signs up. I'm trying to handle the exception if the number is invalid, and Twilio fails to send it. But when the message fails, it never seems to reach the catch in my try/catch clause.

try {
    $message = $twilio->messages
        ->create(
            "$user->phone", // to
            array("from" => "$siteNumber", "body" => "$message_text")
        );
} catch (TwilioException $e) {
    return $e->getMessage();
}

I've also tried the following catch conditions.

} catch (\Services_Twilio_RestException $e) {
    return $e->getMessage();
}
catch (RestException $e) {
    return redirect()->back()->withFlashSuccess("Failed To Send Text");
}
Rent Charter Buses Company
READ ALSO
How show order total quantity in preview order woocommerce [on hold]

How show order total quantity in preview order woocommerce [on hold]

I'm trying to show the order total quantity in preview order woocommerce in admin panelI mean this

129
PHP/Laravel - Carbon and DateTime returning wrong date/time

PHP/Laravel - Carbon and DateTime returning wrong date/time

I have the folowing ProblemI am saving a Carbon or DateTime object in a Variable

228
connect to mysql and get some data [duplicate]

connect to mysql and get some data [duplicate]

This question already has an answer here:

132
how to connect zkteco k40 with PHP(attendance device)

how to connect zkteco k40 with PHP(attendance device)

I want to connect ZKteco k40 with php on xammp localhost to get attendance data what I'm doing write now

293