virtualorz / every8dsms
There is no license information available for the latest version (0.0.5) of this package.
0.0.5
2019-08-09 07:54 UTC
README
Use for Laravel website to send SMS message via every8d service
Install
composer require virtualorz/every8DSMS
Config
edit config/app.php
'providers' => [
...
Virtualorz\Every8DSMS\Every8DSMSServiceProvider::class
]
'aliases' => [
...
'Every8DSMS' => Virtualorz\Every8DSMS\Facades\Every8DSMS::class,
]
Publish data
php artisan vendor:publish --provider="Virtualorz\Every8DSMS\Every8DSMSServiceProvider"
Edit Config
edit config/every8DSMS.php ,
account for every8d login account,
password for every8d login password.
please, DO NOT EDIT 'Api_url'
Method
send($message, $phone, $subject)
send $message to $phone, $phone can be multiple numbers, for example "09889876543,09777876543", $subject can be null
return value :
data['status'] = 1; //1 for success 0 for fail
data['status_string'] = ""; //success or fail
data['message'] = '';//success cost message or fail message
data['data'] = [
'CREDIT' => '',// the recent point on every8d
'SENDED' => '',// hwo many sms send this time
'COST' => '',// cost point this time
'UNSEND' => '',// how many can not send sms
'BATCH_ID' => '',// id for this send
]
getCredit()
get the point on every8d
return value :
data['status'] = 1; //1 for success 0 for fail
data['status_string'] = ""; //success or fail
data['message'] = '';//success cost message or fail message
data['data'] = recent point