/** * Send a SMS. * * @param string $view The desired view. * @param array $data The data that needs to be passed into the view. * @param \Closure $callback The methods that you wish to fun on the message. * * @return \SimpleSoftwareIO\SMS\OutgoingMessage The outgoing message that was sent. */ public function send($view, $data, $callback) { $data['message'] = $message = $this->createOutgoingMessage(); //We need to set the properties so that we can later pass this onto the Illuminate Mailer class if the e-mail gateway is used. $message->view($view); $message->data($data); call_user_func($callback, $message); $this->driver->send($message); return $message; }