public function saveToDb($text, $phone, $message)
    {
        if (!$this->saveToDb) {
            return false;
        }
        $model = new TurboSmsSent();
        $model->text = $text;
        $model->phone = $phone;
        $model->message = $message . ($this->debug ? $this->debugSuffixMessage : '');
        if ($this->lastSendMessageId) {
            $model->message_id = $this->lastSendMessageId;
        }
        $model->status = $this->sendStatus;
        $model->save();

        if ((int)$model->id) {
            $this->lastSendMessagesIds[$model->id] = $this->lastSendMessageId;
        }

        return true;
    }
public function saveToDb($text, $phone, $message)
    {
        if (!$this->saveToDb) {
            return false;
        }
        $model = new TurboSmsSent();
        $model->text = $text;
        $model->phone = $phone;
        $model->message = $message . ($this->debug ? $this->debugSuffixMessage : '');
        if ($this->lastSendMessageId) {
            $model->message_id = $this->lastSendMessageId;
        }
        $model->status = $this->sendStatus;
        $model->save();

        if ((int)$model->id) {
            $this->lastSendMessagesIds[$model->id] = $this->lastSendMessageId;
        }

        return true;
    }
public function saveToDb ( $ text , $ phone , $ message ) { if ( ! $ this -> saveToDb ) { return false ; } $ model = new TurboSmsSent ( ) ; $ model -> text = $ text ; $ model -> phone = $ phone ; $ model -> message = $ message . ( $ this -> debug ? $ this -> debugSuffixMessage : '' ) ; if ( $ this -> lastSendMessageId ) { $ model -> message_id = $ this -> lastSendMessageId ; } $ model -> status = $ this -> sendStatus ; $ model -> save ( ) ; if ( ( int ) $ model -> id ) { $ this -> lastSendMessagesIds [ $ model -> id ] = $ this -> lastSendMessageId ; } return true ; }
Save sms to db

@param string $text
@param string $phone
@param string $message

@return bool
Save sms to db