This extension allows SMS sending via different SMS providers
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist alexeevdv/yii2-sms "~1.0"
or add
"alexeevdv/yii2-sms": "~1.0"
to the require section of your composer.json.
use alexeevdv\sms\provider\SmsRuProvider;
use alexeevdv\sms\Sms;
//...
'components' => [
'sms' => [
'class' => Sms::class,
'provider' => [
'class' => SmsRuProvider::class,
'apiId' => '123456789',
],
],
],
//...
$result = Yii::$app->sms->send('1234567890', 'Hi there!');