Toplan\PhpSms\Sms::voice PHP Method

voice() public static method

Create a sms instance send voice verify, your can also set verify code at the same time.
public static voice ( integer | string | null $code = null ) : Sms
$code integer | string | null
return Sms
    public static function voice($code = null)
    {
        $sms = new self();
        $sms->smsData['type'] = self::TYPE_VOICE;
        $sms->smsData['voiceCode'] = $code;
        return $sms;
    }

Usage Example

Example #1
0
 public function testVoice()
 {
     $sms = Sms::voice('code');
     $data = $sms->getData();
     $this->assertEquals('code', $data['voiceCode']);
 }
All Usage Examples Of Toplan\PhpSms\Sms::voice