class SysArea extends Model mixin Eloquent

地区表

Traits

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

Filterable

Constants

LEVEL_PROVINCE

LEVEL_CITY

LEVEL_COUNTY

Properties

$timestamps
protected $table
protected $fillable
int $id
string $code 编码
string $title 名称
string $parent_id 父级
string $top_parent_id 顶层ID
string $children 所有的子元素
int $has_child 是否有子元素
int $level 级别

Methods

mixed
scopePageFilter(Builder $query, PageInfo $pageInfo)

No description

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

No description

static 
cityTree()

No description

static 
cityMgrTree()

No description

static array
cascader(string $type = 'province')

地区选择

static mixed
kvCity(string $code = '')

城市的KV

static string|array
kvArea(int $id = null)

ID : Title

static mixed
kvProvince(string $code = '')

省份的KV

static array|mixed
kvCityId(int $province)

城市的KV

static array|string
kvProvinceId(int $id = null)

省份的KV

static string|array
kvCountry(string $code = null)

国家KV

static array|mixed
country()

国别缓存

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

No description

static SysArea
pageFilter(PageInfo $pageInfo)

No description

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

No description

static SysArea
simplePaginateFilter(mixed $perPage, mixed $columns, mixed $pageName)

No description

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

No description

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

No description

static SysArea
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 60
static cityTree()

No description

at line 70
static cityMgrTree()

No description

at line 95
static array cascader(string $type = 'province')

地区选择

Parameters

string $type

类型, 支持 province,city,area

Return Value

array

at line 114
static mixed kvCity(string $code = '')

城市的KV

Parameters

string $code

4位长度, 匹配身份证省份/城市

Return Value

mixed

at line 131
static string|array kvArea(int $id = null)

ID : Title

Parameters

int $id

ID : Title

Return Value

string|array

at line 148
static mixed kvProvince(string $code = '')

省份的KV

Parameters

string $code

2位长度, 匹配身份证省份/城市

Return Value

mixed

at line 164
static array|mixed kvCityId(int $province)

城市的KV

Parameters

int $province

Return Value

array|mixed

at line 180
static array|string kvProvinceId(int $id = null)

省份的KV

Parameters

int $id

2位长度, 匹配身份证省份/城市

Return Value

array|string

at line 197
static string|array kvCountry(string $code = null)

国家KV

Parameters

string $code

Return Value

string|array

at line 217
static array|mixed country()

国别缓存

Return Value

array|mixed

at line 38
static SysArea filter(mixed $input, mixed $filter)

No description

Parameters

mixed $input
mixed $filter

Return Value

SysArea

at line 38
static SysArea pageFilter(PageInfo $pageInfo)

No description

Parameters

PageInfo $pageInfo

Return Value

SysArea

at line 38
static SysArea paginateFilter(mixed $perPage, mixed $columns, mixed $pageName, mixed $page)

No description

Parameters

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

Return Value

SysArea

at line 38
static SysArea simplePaginateFilter(mixed $perPage, mixed $columns, mixed $pageName)

No description

Parameters

mixed $perPage
mixed $columns
mixed $pageName

Return Value

SysArea

at line 38
static SysArea whereBeginsWith(mixed $column, mixed $value, mixed $boolean)

No description

Parameters

mixed $column
mixed $value
mixed $boolean

Return Value

SysArea

at line 38
static SysArea whereEndsWith(mixed $column, mixed $value, mixed $boolean)

No description

Parameters

mixed $column
mixed $value
mixed $boolean

Return Value

SysArea

at line 38
static SysArea whereLike(mixed $column, mixed $value, mixed $boolean)

No description

Parameters

mixed $column
mixed $value
mixed $boolean

Return Value

SysArea