src/JetSmsService.php
public function sendShortMessage($receivers, $body = null)
    {
        if (! $receivers instanceof ShortMessage) {
            $receivers = $this->factory->create($receivers, $body);
        }

        if (is_callable($this->beforeSingleShortMessageCallback)) {
            call_user_func_array($this->beforeSingleShortMessageCallback, [$receivers]);
        }

        $response = $this->client->sendShortMessage($receivers);

        if (is_callable($this->afterSingleShortMessageCallback)) {
            call_user_func_array($this->afterSingleShortMessageCallback, [$response, $receivers]);
        }

        return $response;
    }
public function sendShortMessage($receivers, $body = null)
    {
        if (! $receivers instanceof ShortMessage) {
            $receivers = $this->factory->create($receivers, $body);
        }

        if (is_callable($this->beforeSingleShortMessageCallback)) {
            call_user_func_array($this->beforeSingleShortMessageCallback, [$receivers]);
        }

        $response = $this->client->sendShortMessage($receivers);

        if (is_callable($this->afterSingleShortMessageCallback)) {
            call_user_func_array($this->afterSingleShortMessageCallback, [$response, $receivers]);
        }

        return $response;
    }
public function sendShortMessage ( $ receivers , $ body = null ) { if ( ! $ receivers instanceof ShortMessage ) { $ receivers = $ this -> factory -> create ( $ receivers , $ body ) ; } if ( is_callable ( $ this -> beforeSingleShortMessageCallback ) ) { call_user_func_array ( $ this -> beforeSingleShortMessageCallback , [ $ receivers ] ) ; } $ response = $ this -> client -> sendShortMessage ( $ receivers ) ; if ( is_callable ( $ this -> afterSingleShortMessageCallback ) ) { call_user_func_array ( $ this -> afterSingleShortMessageCallback , [ $ response , $ receivers ] ) ; } return $ response ; }
Send the given body to the given receivers.

@param  array|string|ShortMessage $receivers The receiver(s) of the message or the message object.
@param  string|null               $body      The body of the message or null when using short message object.

@return JetSmsResponseInterface The parsed JetSms response object.
Send the given body to the given receivers .