The preferred way to install this extension is through Composer.
Either run
php composer.phar require zelenin/yii2-sms_ru "dev-master"
or add
"zelenin/yii2-sms_ru": "dev-master"
to the require section of your composer.json
Add code in your components section of application configuration:
'sms' => [
'class' => 'Zelenin\yii\extensions\Sms',
'api_id' => '<api_id>'
],
or:
'sms' => [
'class' => 'Zelenin\yii\extensions\Sms',
'api_id' => '<api_id>',
'login' => '<login>',
'password' => '<password>'
],
SMS sending:
\Yii::$app->sms->sms_send( '<number>', '<text>' );
Aleksandr Zelenin, e-mail: aleksandr@zelenin.me
Comments