class Ad

广告内容处理类

Traits

AppTrait

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
bool
establish(array $data, null $id = null)

编辑/创建 广告

bool
delete(int $id)

删除数据

bool
toggle(int $id)

开启/关闭 广告

void
init(int $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

at line 37
bool establish(array $data, null $id = null)

编辑/创建 广告

Parameters

array $data

传入数据
string place_id 位置 ID
int title 位置名称
int introduce 位置介绍
string start_at 投放时段-开始时间
string end_at 投放时段-结束时间
string src 图片地址
string url 链接地址
int is_enable 广告状态

null $id ID

Return Value

bool

at line 75
bool delete(int $id)

删除数据

Parameters

int $id 活动ID

Return Value

bool

at line 93
bool toggle(int $id)

开启/关闭 广告

Parameters

int $id 广告ID

Return Value

bool

at line 105
void init(int $id)

初始化

Parameters

int $id

活动 ID

Return Value

void