Description
Exception : Twilio\Rest\Api\V2010\Account\MessageList::create(): Argument #1 ($to) must be of type string, null given,
View Code
$contractorNmr = User::where('id', $contractor->contractor_id)->first();
$message = $AuthUser . ' ' . 'has created new work order';
$client = new Client($account_sid, $auth_token);
$client->messages->create($contractorNmr->mpnumber, [
'from' => $twilio_number,
'body' => $message
]);
In the create method you are passing some null values, so make sure your value is there and try again. If still it doesn't work, reach out again in the comment.
0 Likes 1 Comment
Hadayat Niazi Super Admin
If your issue was resolved, please mark this as solved.
commented 1 year ago