alexeevdv / yii2-sms
This extension allows SMS sending via different SMS providers
Installs: 11 243
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1
Open Issues: 0
Type:yii2-extension
pkg:composer/alexeevdv/yii2-sms
Requires
- yiisoft/yii2: ^2.0
- yiisoft/yii2-httpclient: ^2.0
Requires (Dev)
This package is auto-updated.
Last update: 2025-10-29 02:03:13 UTC
README
This extension allows SMS sending via different SMS providers
Installation:
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.
Configuration:
use alexeevdv\sms\provider\SmsRuProvider;
use alexeevdv\sms\Sms;
//...
   'components' => [
       'sms' => [
           'class' => Sms::class,
           'provider' => [
               'class' => SmsRuProvider::class,
               'apiId' => '123456789',
           ],
       ],
   ],
//...
Usage:
$result = Yii::$app->sms->send('1234567890', 'Hi there!');