alexeevdv/yii2-sms-ge-unicard

1.0.1 2018-05-16 12:02 UTC

This package is auto-updated.

Last update: 2024-04-29 03:50:55 UTC


README

Build Status codecov PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2

Yii2 wrapper for Geordian UNICARD sms provider

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require alexeevdv/yii2-sms-ge-unicard "~1.0.0"

or add

"alexeevdv/yii2-sms-ge-unicard": "~1.0.0"

to the require section of your composer.json file.

Configuration

Via application component

'components' => [
    'sms' => [
        'class' => \alexeevdv\sms\ge\unicard\Provider::class,
        // If you want to ensure only Georgia phone numbers would be sent
        //'destinationChecker' => \alexeevdv\sms\ge\unicard\GeorgiaDestinationChecker::class,
    ],
],

Usage

Yii::$app
    ->sms
    ->compose('view', ['attribute' => 'value'])
    ->setTo('123412341234')
    ->setFrom('Sender') 
    ->send()
;