public function send($text, $phones)
    {
        if (!is_array($phones)) {
            $phones = [$phones];
        }

        foreach ($phones as $phone) {
            if (!$phone) {
                continue;
            }
            $message = $this->sendMessage($text, $phone);
            $this->saveToDb($text, $phone, $message);
        }

        return $this->lastSendMessagesIds;
    }
public function send($text, $phones)
    {
        if (!is_array($phones)) {
            $phones = [$phones];
        }

        foreach ($phones as $phone) {
            if (!$phone) {
                continue;
            }
            $message = $this->sendMessage($text, $phone);
            $this->saveToDb($text, $phone, $message);
        }

        return $this->lastSendMessagesIds;
    }
public function send ( $ text , $ phones ) { if ( ! is_array ( $ phones ) ) { $ phones = [ $ phones ] ; } foreach ( $ phones as $ phone ) { if ( ! $ phone ) { continue ; } $ message = $ this -> sendMessage ( $ text , $ phone ) ; $ this -> saveToDb ( $ text , $ phone , $ message ) ; } return $ this -> lastSendMessagesIds ; }
Send sms and return array of message's ids in database

@param string $text
@param $phones

@return array

@throws InvalidConfigException
Send sms and return array of message s ids in database