code2magic/yii2-smsgateway

SMS gateway

Installs: 540

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:yii2-extension

0.2.0 2020-03-12 15:44 UTC

This package is auto-updated.

Last update: 2024-11-12 23:33:36 UTC


README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require code2magic/yii2-smsgateway --prefer-dist

or add

"code2magic/yii2-smsgateway": "*"

to the require section of your composer.json file.

Configuration

This extension is supposed to be used with composer-config-plugin.

Else look config/common.php for cofiguration example.

Usage

Use with DI

$sms_gateway = \Yii::createObject(SmsGateway::class);
$ms_gateway->send($phone, $text, [])

or as component

// config
'components' => [
    // ...
    'sms_gateway' => \code2magic\smsGateway\SmsGateway::class,
    // ...
],
// usage
\Yii::$app->sms_gateway->send($phone, $text, [])