mrssoft/yii2-sms

Extension for sending SMS

Installs: 95

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

1.1.2 2024-10-28 07:48 UTC

This package is auto-updated.

Last update: 2024-10-28 07:49:46 UTC


README

Extension for sending SMS

Latest Stable Version PHP Total Downloads

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist mrssoft/yii2-sms "*"

or add

"mrssoft/yii2-sms": "*"

to the require section of your composer.json file.

Usage

Configuration:

'components' => [
    ...
    'sms' => [
        'class' => 'mrssoft\sms\drivers\tele2\Sms',
        'apiUrl' => 'https://target.t2.ru/api/v2/',
        'login' => '',
        'password' => '',
        'naming' => 'BRAND',
    ],
    ...
    'sms' => [
        'class' => 'mrssoft\sms\drivers\mts\Sms',
        'token' => '',
        'naming' => 'BRAND',
    ],
    ....
]

Usage:

Yii::$app->sms->sendMessage('Message', '79830000000');
Yii::$app->sms->sendMessages('Message', ['79830000000', '79830000001']);