2017 © Pedro Peláez
 

library luminous-sms

A powerful international SMS push.

image

anomalylab/luminous-sms

A powerful international SMS push.

  • Sunday, April 22, 2018
  • by bill@anomalylab.org
  • Repository
  • 1 Watchers
  • 9 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 19 Versions
  • 200 % Grown

The README.md

, (*1)

A powerful international SMS push., (*2)

Features

  1. Support the current market more than service providers.
  2. Simple configuration can flexibly increase or decrease service providers.
  3. Unified return format, easy to log and monitor.
  4. Automatic polling Select available service providers.

Platform support

Environmental

  • PHP >= 7.1

Intalling

$ composer require anomalylab/luminous-sms

Usage


use AnomalyLab\LuminousSMS\Contracts\MessagerInterface; $sms = (new AnomalyLab\LuminousSMS\LuminousSms) ->setConfig([ 'default_handler' => 'qcloud', 'supported' => [ 'qcloud' => [ 'app_key' => 'app key', 'app_id' => 'app id', ], 'yunpian' => [ 'app_key' ] ] ]);

Seeding

$sms->sender(function($messager) {
    $messager
        ->setMobilePhone('18898726543')
        //  Use voice.
        ->setType(AnomalyLab\LuminousSMS\Contracts\MessagerInterface::VOICE_MESSAGE)
        ->setContent('{name},您的验证码是{code}, 验证码将在{time}分钟后失效!请及时使用。')
        ->setData([
            'name'  => 'Hello',
            'code'  => rand(100000, 999999),
            'time'  => 10
        ]);
});
OR
$sms->sender([
    'mobilePhone'   => '18898726543',
    'content'       => '{name},您的验证码是{code}, 验证码将在{time}分钟后失效!请及时使用。',
    'data'          => [
        'name'  => 'Hello',
        'code'  => rand(100000, 999999),
        'time'  => 10
    ]
]);

SMS content

A message to support multi-platform send, each sent in a different way, but we abstractly define the following common attributes:, (*3)

  • content Text content, use similar to Tencent cloud to send text messages to the platform
  • template Template ID, used in the template ID to send text messages platform
  • data Template variable, used in the template ID to send sms platform

Platform configuration instructions

云片
    'yunpian' => [
        'api_key' => '',
    ],
腾讯云 SMS
    'qcloud' => [
        'app_id' => '',  // APP ID
        'app_key' => '', // APP KEY
    ],
聚合数据
    'juhe' => [
        'app_key' => '',
    ],
阿里大鱼
    'alidayu' => [
        'sign_name' => '',
        'app_key' => '',
        'app_secret' => '',
    ],
百度云
    'baidu' => [
        'ak'        => '',
        'sk'        => '',
        'invoke_id' => '',
        'domain'    => '',
    ],

API

    AnomalyLab\LuminousSMS\LuminousSMS
sender(callable | array $callback, null|string $handler)
Arguments
Key Required Type Default Description
$callback true callable | array none Send information data, AnomalyLab\LuminousSMS\Messenger::class
$handler false null | string qcloud Send the drive settings using SMS. We will default to Tencent cloud sms.

License

MIT, (*4)

The Versions

22/04 2018

2.0.x-dev

2.0.9999999.9999999-dev

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

The Development Requires

sms php7 luminous sms

22/04 2018

2.0.2

2.0.2.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

The Development Requires

sms php7 luminous sms

22/04 2018

2.0.1

2.0.1.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

The Development Requires

sms php7 luminous sms

22/04 2018

2.0.0

2.0.0.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

The Development Requires

sms php7 luminous sms

27/03 2018

dev-master

9999999-dev

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

The Development Requires

sms php7 luminous sms

27/03 2018

1.5.2

1.5.2.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

The Development Requires

sms php7 luminous sms

28/02 2018

1.5.1

1.5.1.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

The Development Requires

sms php7 luminous sms

19/02 2018

1.5.0

1.5.0.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

24/01 2018

1.4.1

1.4.1.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

24/01 2018

1.4.0

1.4.0.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

24/01 2018

1.3.0

1.3.0.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

24/01 2018

1.2.4

1.2.4.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

24/01 2018

1.2.3

1.2.3.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

24/01 2018

1.2.2

1.2.2.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

24/01 2018

1.2.1

1.2.1.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

23/01 2018

1.2.0

1.2.0.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

23/01 2018

1.1.0

1.1.0.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

23/01 2018

1.0.1

1.0.1.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms

23/01 2018

1.0.0

1.0.0.0

A powerful international SMS push.

  Sources   Download

MIT

The Requires

 

sms php7 luminous sms