Skip to content

Yii2 extension to use NRS Gateway services like SMS Push.

License

Notifications You must be signed in to change notification settings

marqu3s/yii2-nrsgateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 Framework NRSGateway extension.

Yii2 Framework website

Installation

Composer

The preferred way to install this extension is through Composer.

Either run

php composer.phar require marqu3s/yii2-nrsgateway "dev"

or add

"marqu3s/yii2-nrsgateway": "dev"

to the require section of your composer.json

Usage

Add to main.php components section:

[
    'components' => [
        ...
        'sms' => [
            'class' => 'marqu3s\nrsgateway\YiiSMSService',
            'username' => 'theUsername',
            'password' => 'thePassword'
        ],
        ...
    ]
]

and use it:

$nrs = Yii::$app->sms->nrs;
$nrs->to   = ['xxxxxxxxxxxxx', 'yyyyyyyyyyyyy'];
$nrs->from = 'Sender';
$nrs->msg  = 'This is a test message.';
$result = $nrs->send();

Check $result variable for errors.

Original Author

João Marques, e-mail: [email protected]

About

Yii2 extension to use NRS Gateway services like SMS Push.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages