Sms sender
The message sender. The package includes sending for service TurboSMS, SmsAPI., (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist gud3/yii2-sms "*"
or add, (*4)
"gud3/yii2-sms": "*"
to the require section of your composer.json
file., (*5)
Usage
To use this extension, simply add the following code in your application configuration:, (*6)
sender name for turbo sms by default 'Msg', (*7)
return [
//....
'components' => [
'sms' => [
'class' => 'gud3\sms\Client',
'sender' => 'Display name',
'service' => [
'class' => 'gud3\sms\Services\SmsApi', // or TurboSms
'login' => '***',
'password' => '***',
],
],
],
];
You can then send an sms in queue as follows:, (*8)
Yii::$app->sms->send('+**********', 'This is text of test message');
Yii::$app->sms->send(['+**********', '+**********'], 'This is text of test message');