2017 © Pedro Peláez
 

library laravel-sms

SMS Component for Laravel 5 - 第三方短信平台客户端

image

netjoint/laravel-sms

SMS Component for Laravel 5 - 第三方短信平台客户端

  • Monday, September 14, 2015
  • by yanzhou
  • Repository
  • 2 Watchers
  • 1 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SMS Component for Laravel 5 简体中文版

Supported SMS Providers

Installation

Add laravel-sms to your composer.json file, (*1)

"require": {
  "netjoint/laravel-sms": "dev-master"
}

Registering the Package

For Laravel 5.1

Register the service provider within the providers array found in config/app.php, (*2)

'providers' => array(
    // ...

    NetJoint\LaravelSms\LaravelSmsServiceProvider::class,
)

Add an alias within the aliases array found in config/app.php:, (*3)

'aliases' => array(
    // ...

    'Sms' => NetJoint\LaravelSms\Facades\Sms::class,
)

For Laravel 5.0

Register the service provider within the providers array found in config/app.php, (*4)

'providers' => array(
    // ...

    'NetJoint\LaravelSms\LaravelSmsServiceProvider',
)

Add an alias within the aliases array found in config/app.php:, (*5)

'aliases' => array(
    // ...

    'Sms' => 'NetJoint\LaravelSms\Facades\Sms',
)

Configuration

Publish the package's config file to config/laravel-sms.php, (*6)

php artisan vendor:publish --provider="NetJoint\LaravelSms\LaravelSmsServiceProvider"

Add the following to your .env file, (*7)

# Default SMS Provider(lowercase)
SMS_PROVIDER=yimei
# Serial key for SMS Provider Yimei
SMS_YIMEI_CDKEY=2SDK-EMY-6688-AAAAA
# Password for SMS Provider Yimei
SMS_YIMEI_PASSWORD=123456

Usage

use NetJoint\LaravelSms\Facades\Sms;

// $mobile  mobile number
// $message SMS message
// return True if success and False if fail
Sms::send($mobile, $message);

Make a Contribution

Place your implementation of ProviderInterface in Provider under the namespace NetJoint\LaravelSms\Provider and then send me pull request., (*8)

Licence

MIT, (*9)

The Versions

14/09 2015

dev-master

9999999-dev

SMS Component for Laravel 5 - 第三方短信平台客户端

  Sources   Download

MIT

The Requires

 

by NetJoint Ltd