class Sms

短信模板

Traits

AppTrait

Db Trait Db 工具

Constants

SCOPE_LOCAL

SCOPE_ALIYUN

SCOPE_CHUANGLAN

SCOPE_LIANLU

Properties

protected Resp $error error from  AppTrait
protected Resp $success success from  AppTrait

Methods

getError()

获取错误

from  AppTrait
bool
setError(string|MessageBag $error)

设置错误

from  AppTrait
getSuccess()

Get success messages;

from  AppTrait
bool
setSuccess(Resp|string $success)

No description

from  AppTrait
sysSetting()

检查当前是否是在事务中

__construct()

No description

static array|string
kvType(string $key = null, bool $check_key = false)

短信类型

static array|bool|string
kvPlatform(string $key = null, bool $check_key = false)

平台类型

static array
smsTpl(string $type, string $scope)

获取指定平台对应类型的模板

static string
rateSmsType()

获取现在配置分流的短信

Collection
getTemplates()

获取所有的模版

array
getItem()

No description

bool
establish(string $id, string $code)

新增和编辑

bool
init(string $id)

初始化

bool
destroy(string $id)

刪除

Details

in AppTrait at line 32
Resp getError()

获取错误

Return Value

Resp

in AppTrait at line 45
bool setError(string|MessageBag $error)

设置错误

Parameters

string|MessageBag $error error

Return Value

bool

in AppTrait at line 82
Resp getSuccess()

Get success messages;

Return Value

Resp

in AppTrait at line 100
bool setSuccess(Resp|string $success)

No description

Parameters

Resp|string $success 设置的成功信息

Return Value

bool

in SystemTrait at line 20
protected SettingRepository sysSetting()

检查当前是否是在事务中

Return Value

SettingRepository

at line 42
__construct()

No description

at line 53
static array|string kvType(string $key = null, bool $check_key = false)

短信类型

Parameters

string $key key
bool $check_key 检测key是否存在

Return Value

array|string

at line 65
static array|bool|string kvPlatform(string $key = null, bool $check_key = false)

平台类型

Parameters

string $key
bool $check_key

Return Value

array|bool|string

at line 80
static array smsTpl(string $type, string $scope)

获取指定平台对应类型的模板

Parameters

string $type 类型
string $scope

Return Value

array [type|code|content]

at line 94
static string rateSmsType()

获取现在配置分流的短信

Return Value

string

at line 111
Collection getTemplates()

获取所有的模版

Return Value

Collection

at line 119
array getItem()

No description

Return Value

array

at line 132
bool establish(string $id, string $code)

新增和编辑

Parameters

string $id
string $code

Return Value

bool

Exceptions

SettingKeyNotMatchException
SettingValueOutOfRangeException

at line 149
bool init(string $id)

初始化

Parameters

string $id ID

Return Value

bool

Exceptions

HintException

at line 170
bool destroy(string $id)

刪除

Parameters

string $id id

Return Value

bool

Exceptions

SettingKeyNotMatchException
SettingValueOutOfRangeException