Skip to content
安正超 edited this page Mar 16, 2017 · 3 revisions

Welcome to the easy-sms wiki!

Installation

$ composer require "overtrue/easy-sms"

Configuration

$config = [
    'default' => 'error-log',
    'gateways' => [
        /*...*/
        'error-log' => [
            'file' => '/tmp/easy-sms.log',
        ],
        /*...*/
        'yun-pian' => [
            'api_key' => '824f0ff2f71cab52936a13ede3xxxxx',
        ],
        /*...*/
        'GATEWAY_NAME' => [GATEWAY_CONFIG]
       //...
    ],
];

Usage

use Overtrue\EasySms\EasySms;

$config = ...;

$easySms = new EasySms($config);
$easySms->gateway('GATEWAY_NAME')->send(19188888888, 'hello world!');

Gateways

Clone this wiki locally