marqu3s / yii2-nrsgateway
Yii2 NRSGateway extension.
Installs: 108
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- marqu3s/nrsgateway: @stable
- yiisoft/yii2: ~2
This package is auto-updated.
Last update: 2024-12-19 07:04:01 UTC
README
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: joao@jjmf.com