client()->messages->create( $to, [ 'from' => setting('sms_from'), 'body' => $message, ] ); } catch (Exception $e) { throw new SmsException('Twilio: ' . $e->getMessage()); } } /** * @throws ConfigurationException */ public function client() { return new Client(setting('twilio_sid'), setting('twilio_token')); } }