Skip to content
/ yii2-sms Public

The message sender. The package includes sending for service turbosms and smsapi.

Notifications You must be signed in to change notification settings

gud3/yii2-sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sms sender

The message sender. The package includes sending for service TurboSMS, SmsAPI.

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"gud3/yii2-sms": "*"

to the require section of your composer.json file.

Usage

To use this extension, simply add the following code in your application configuration:

sender name for turbo sms by default 'Msg'

return [
    //....
    'components' => [
        'sms' => [
            'class' => 'gud3\sms\Client',
            'sender' => 'Display name',
            'service' => [
                'class' => 'gud3\sms\Services\SmsApi', // or TurboSms
                'login' => '***',
                'password' => '***',
            ],
        ],
    ],
];

You can then send an sms in queue as follows:

Yii::$app->sms->send('+**********', 'This is text of test message');
Yii::$app->sms->send(['+**********', '+**********'], 'This is text of test message');

About

The message sender. The package includes sending for service turbosms and smsapi.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages