Using relay client api to send sms from Signalwire it gives an error message
"Call to a member function send() on null" in file vendor\signalwire\signalwire\src\Relay\Connection.php
$this->_ws->send($msg->toJson());
I am using these code below
use SignalWire\Relay\Client;
$client = new Client(['project' =>'project_id','token' => 'token_id']);
$params = [
'context' => 'office',
'from' => '+1++++',
'to' => '+1++++',
'body' => 'Welcome at SignalWire!'
];
Log::info('Sending SMS..');
$client->messaging->send($params)->done( function ($sendResult){
if ($sendResult->isSuccessful()) {
Log::info('SMS queued successfully!');
echo 'success';
} else {
Log::warning('Error sending SMS!');
echo 'error';
}
});