virtualorz/every8dsms

此包最新版本(0.0.5)没有可用的许可信息。

0.0.5 2019-08-09 07:54 UTC

This package is auto-updated.

Last update: 2024-09-09 19:30:02 UTC


README

用于Laravel网站通过every8d服务发送短信

安装

composer require virtualorz/every8DSMS

配置

编辑 config/app.php

'providers' => [
    ...
    Virtualorz\Every8DSMS\Every8DSMSServiceProvider::class
]

'aliases' => [
    ...
    'Every8DSMS' => Virtualorz\Every8DSMS\Facades\Every8DSMS::class,
]

发布数据

php artisan vendor:publish --provider="Virtualorz\Every8DSMS\Every8DSMSServiceProvider"

编辑配置

编辑 config/every8DSMS.php ,
every8d 登录账号,
every8d 登录密码。
请勿编辑 'Api_url'

方法

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

中文版本文件

Every8DSMS : 傳送簡訊超簡單