<?php

namespace App\Modules;

use SoapClient;

class SendSms
{
    public function SendSmsStart($mobile, $content)
    {
        ini_set("soap.wsdl_cache_enabled", "0");
        $sms = new SoapClient("http://payammatni.com/webservice/send.php?wsdl");
        $sms->Username = "omidkhodakarami";
        $sms->Password = "omid13340";
        $sms->fromNum = "+989998763773";
        $sms->toNum = array($mobile);
        $sms->Content = $content;
        $sms->Type = '0';
        $sms->SendSMS($sms->fromNum, $sms->toNum, $sms->Content, $sms->Type, $sms->Username, $sms->Password);
    }

    public static function send($mobile, $content)
    {
        (new self())->SendSmsStart($mobile, $content);
    }
}
