dev-master
9999999-devSMS Component for Laravel 5 - 第三方短信平台客户端
MIT
The Requires
- php >=5.4.0
- laravel/framework 5.*
- guzzlehttp/guzzle ~6.0
by NetJoint Ltd
SMS Component for Laravel 5 - 第三方短信平台客户端
Add laravel-sms to your composer.json
file, (*1)
"require": { "netjoint/laravel-sms": "dev-master" }
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, )
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', )
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
use NetJoint\LaravelSms\Facades\Sms; // $mobile mobile number // $message SMS message // return True if success and False if fail Sms::send($mobile, $message);
Place your implementation of ProviderInterface
in Provider
under the namespace NetJoint\LaravelSms\Provider
and then send me pull request., (*8)
MIT, (*9)
SMS Component for Laravel 5 - 第三方短信平台客户端
MIT