RBT SMS
RBT SMS Component, (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist rbt/yii2-rbtsms "*"
or add, (*4)
"rbt/yii2-rbtsms": "*"
to the require section of your composer.json
file., (*5)
Configuration
To use this extension, you have to configure the Connection class in your application configuration:, (*6)
return [
//....
'components' => [
'sms' => [
'class' => '\rbt\sms\Sms',
'APIKEY' => 'apikey',
'SENDER_NAME' => 'sms sender name',
'SMS_URL'=>'sms service url'
],
]
];, (*7)
Usage
Once the extension is installed, simply use it in your code by :, (*8)
php
<?= \rbt\sms\Sms::SmsSend($phone_number,$message); ?>
, (*9)