TurboSMS component gives you an ability to send SMS messages via TurboSMS.ua SMS gateway.
This component is built with use of TurboSMS SOAP service.
The preferred way to install this extension is through Composer.
php composer.phar require kop/yii2-turbosms "dev-master"
require section of your
All you need is to declare a new component in your application configuration file like follows:
return [ ... 'components' => [ ... 'sms' => [ 'class' => '\kop\y2ts\TurboSMS', 'username' => '<<< YOUR USERNAME HERE >>>' 'password' => '<<< YOUR PASSWORD HERE >>>', 'alphaName' => 'MyWebsite', ] ... ] ... ];
The username used for authentication on TurboSMS SOAP service.
The password used for authentication on TurboSMS SOAP service.
The name that users will see as the message sender name.
As simple as:
Yii::$app->sms->send(['+380501234567', '+380502345678'], 'Hello world!');
Please refer to the class documentation for more methods and options.
yii2-turbosms is released under the MIT License. See the bundled
LICENSE.md for details.