Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexeevdv/yii2-sms
This extension allows SMS sending via different SMS providers
https://github.com/alexeevdv/yii2-sms
sms sms-provider smsc smsru yii2 yii2-extension
Last synced: 2 months ago
JSON representation
This extension allows SMS sending via different SMS providers
- Host: GitHub
- URL: https://github.com/alexeevdv/yii2-sms
- Owner: alexeevdv
- License: mit
- Created: 2017-12-05T15:58:06.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-01T12:45:57.000Z (over 4 years ago)
- Last Synced: 2024-10-07T17:01:13.821Z (3 months ago)
- Topics: sms, sms-provider, smsc, smsru, yii2, yii2-extension
- Language: PHP
- Size: 33.2 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
yii2-sms
==========[![Build Status](https://travis-ci.org/alexeevdv/yii2-sms.svg?branch=master)](https://travis-ci.org/alexeevdv/yii2-sms)
[![codecov](https://codecov.io/gh/alexeevdv/yii2-sms/branch/master/graph/badge.svg)](https://codecov.io/gh/alexeevdv/yii2-sms)
![PHP 5.6](https://img.shields.io/badge/PHP-5.6-green.svg)
![PHP 7.0](https://img.shields.io/badge/PHP-7.0-green.svg)
![PHP 7.1](https://img.shields.io/badge/PHP-7.1-green.svg)
![PHP 7.2](https://img.shields.io/badge/PHP-7.2-green.svg)
![PHP 7.3](https://img.shields.io/badge/PHP-7.3-green.svg)
![PHP 7.4](https://img.shields.io/badge/PHP-7.4-green.svg)This extension allows SMS sending via different SMS providers
Installation:
-------------The preferred way to install this extension is through [composer](https://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist alexeevdv/yii2-sms "~1.0"
```or add
```
"alexeevdv/yii2-sms": "~1.0"
```to the require section of your composer.json.
Configuration:
--------------
```
use alexeevdv\sms\provider\SmsRuProvider;
use alexeevdv\sms\Sms;//...
'components' => [
'sms' => [
'class' => Sms::class,
'provider' => [
'class' => SmsRuProvider::class,
'apiId' => '123456789',
],
],
],
//...```
Usage:
------```
$result = Yii::$app->sms->send('1234567890', 'Hi there!');
```
Supported providers:
--------------------* [sms.ru](http://sms.ru/)
Class: \alexeevdv\sms\provider\SmsRuProvider
Params:
* `apiId` - Your api ID from sms.ru* [smsc.ru](http://smsc.ru/)
Class: \alexeevdv\sms\provider\SmscRuProvider
Params:
* `login` - Your login from smsc.ru
* `psw` - Your plain text or MD5 hashed password from smsc.ru