class Category

分类管理

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
getItem()

No description

bool
establish(array $data, int $id = null)

编辑/创建分类

bool
sort(string $type, int $id, string $compare, int $aim_id)

设置排序, 此处排序支持的是 升序排列的状态下的 Position 位置是可用的

void
delete(int $id)

删除数据

void
status(int $id, int $status)

删除数据

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 34
SysCategory getItem()

No description

Return Value

SysCategory

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

编辑/创建分类

Parameters

array $data

传入数据
{string} title 名称
{int} parent_id 父级 ID
{string} type 类型

int $id ID

Return Value

bool

at line 86
bool sort(string $type, int $id, string $compare, int $aim_id)

设置排序, 此处排序支持的是 升序排列的状态下的 Position 位置是可用的

Parameters

string $type
int $id
string $compare
int $aim_id

Return Value

bool

at line 138
void delete(int $id)

删除数据

Parameters

int $id 活动ID

Return Value

void

Exceptions

Exception

at line 154
void status(int $id, int $status)

删除数据

Parameters

int $id 活动ID
int $status

Return Value

void

at line 166
void init(int $id)

初始化

Parameters

int $id

活动 ID

Return Value

void