2017 © Pedro Peláez
 

yii2-extension yii2-sms

SMS Component for Yii2

image

darkunz/yii2-sms

SMS Component for Yii2

  • Friday, July 8, 2016
  • by darkunz
  • Repository
  • 1 Watchers
  • 1 Stars
  • 392 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

SMS Component for Yii 2

Note: Only using Twilio at the moment., (*1)

Setup

// app/config/main.php
return [
    ...
    'components' => [
        ...
        'sms' => [
            'class' => 'darkunz\yii2sms\Twilio',
            'sid' => '',
            'token' => '',
            'number' => '',
        ]
        ...
    ]
    ...
];

Usage

class User extends AR implements RecipientInterface {
    ...
    public function getMobileNumber() {
        return $this->profile->mobile_number;
    }
    ...
}

$user = User::findByPk(1);
Yii::$app->sms->send($user, 'Hi');

// or

Yii::$app->sms->send('+612345678910', 'Hi');

The Versions

08/07 2016

dev-master

9999999-dev

SMS Component for Yii2

  Sources   Download

MIT

The Requires

 

by Avatar darkunz

yii2 sms yii2-sms