class SysCategory extends Model mixin Eloquent

分类管理

Traits

对 filter 的封装, 进行页面返回

Filterable

Constants

TYPE_DEFAULT

SORT_GT

SORT_LT

Properties

protected $table
protected $fillable
int $id id
string $title 标题
string $name 标识
string $parent_id

上级 ID

string $type 类型
int $list_order 排序
int $is_enable 排序
Carbon|null $created_at 创建时间
Carbon|null $updated_at 修改时间

Methods

mixed
scopePageFilter(Builder $query, PageInfo $pageInfo)

No description

static JsonResponse
paginationInfo(Model $Db, string|Closure $resource, array $append = [])

No description

static array
kvType()

No description

static int
kvNameRefId(string $key)

名称和 ID 的映射

static string
kvTitle(int $id)

ID 和 标题的映射

static string
kvSlug(int $id)

ID 和 Name 的映射

static string
kvTypeSlug(int $id)

ID 和 Name 的映射

static array
tree(string $type, bool $replace_space = false)

树型

static SysCategory
filter(mixed $input, mixed $filter)

No description

static SysCategory
pageFilter(PageInfo $pageInfo)

No description

static SysCategory
paginateFilter(mixed $perPage, mixed $columns, mixed $pageName, mixed $page)

No description

static SysCategory
simplePaginateFilter(mixed $perPage, mixed $columns, mixed $pageName, mixed $page)

No description

static SysCategory
whereBeginsWith(mixed $column, mixed $value, mixed $boolean)

No description

static SysCategory
whereEndsWith(mixed $column, mixed $value, mixed $boolean)

No description

static SysCategory
whereLike(mixed $column, mixed $value, mixed $boolean)

No description

Details

in FilterTrait at line 28
mixed scopePageFilter(Builder $query, PageInfo $pageInfo)

No description

Parameters

Builder $query 查询条件
PageInfo $pageInfo 分页

Return Value

mixed

in FilterTrait at line 41
static JsonResponse paginationInfo(Model $Db, string|Closure $resource, array $append = [])

No description

Parameters

Model $Db 数据对象
string|Closure $resource 资源
array $append 增加

Return Value

JsonResponse

at line 57
static array kvType()

No description

Return Value

array

at line 75
static int kvNameRefId(string $key)

名称和 ID 的映射

Parameters

string $key

Return Value

int

at line 91
static string kvTitle(int $id)

ID 和 标题的映射

Parameters

int $id

Return Value

string

at line 106
static string kvSlug(int $id)

ID 和 Name 的映射

Parameters

int $id

Return Value

string

at line 121
static string kvTypeSlug(int $id)

ID 和 Name 的映射

Parameters

int $id

Return Value

string

at line 137
static array tree(string $type, bool $replace_space = false)

树型

Parameters

string $type 类型
bool $replace_space 空格

Return Value

array

at line 37
static SysCategory filter(mixed $input, mixed $filter)

No description

Parameters

mixed $input
mixed $filter

Return Value

SysCategory

at line 37
static SysCategory pageFilter(PageInfo $pageInfo)

No description

Parameters

PageInfo $pageInfo

Return Value

SysCategory

at line 37
static SysCategory paginateFilter(mixed $perPage, mixed $columns, mixed $pageName, mixed $page)

No description

Parameters

mixed $perPage
mixed $columns
mixed $pageName
mixed $page

Return Value

SysCategory

at line 37
static SysCategory simplePaginateFilter(mixed $perPage, mixed $columns, mixed $pageName, mixed $page)

No description

Parameters

mixed $perPage
mixed $columns
mixed $pageName
mixed $page

Return Value

SysCategory

at line 37
static SysCategory whereBeginsWith(mixed $column, mixed $value, mixed $boolean)

No description

Parameters

mixed $column
mixed $value
mixed $boolean

Return Value

SysCategory

at line 37
static SysCategory whereEndsWith(mixed $column, mixed $value, mixed $boolean)

No description

Parameters

mixed $column
mixed $value
mixed $boolean

Return Value

SysCategory

at line 37
static SysCategory whereLike(mixed $column, mixed $value, mixed $boolean)

No description

Parameters

mixed $column
mixed $value
mixed $boolean

Return Value

SysCategory