Properties

$id

$id : integer

Type

integer

$pid

$pid : integer

Type

integer

$name

$name : string

Type

string

$title

$title : string

Type

string

$icon

$icon : string|null

Type

string|null

$path

$path : string|null

访问路径

Type

string|null

$component

$component : string|null

vue 对应的组件地址

Type

string|null

$sort

$sort : integer

排序

Type

integer

$hidden

$hidden : integer

是否隐藏 0=false|不隐藏 1=true|隐藏

Type

integer

$guard_name

$guard_name : string

Type

string

$created_at

$created_at : \Illuminate\Support\Carbon|null

Type

\Illuminate\Support\Carbon|null

$updated_at

$updated_at : \Illuminate\Support\Carbon|null

Type

\Illuminate\Support\Carbon|null

$activities

$activities : \Illuminate\Database\Eloquent\Collection|array<mixed,\Spatie\Activitylog\Models\Activity>

Type

\Illuminate\Database\Eloquent\Collection|array<mixed,\Spatie\Activitylog\Models\Activity>

$activities_count

$activities_count : integer|null

Type

integer|null

$permissions

$permissions : \Illuminate\Database\Eloquent\Collection|array<mixed,\Spatie\Permission\Models\Permission>

Type

\Illuminate\Database\Eloquent\Collection|array<mixed,\Spatie\Permission\Models\Permission>

$permissions_count

$permissions_count : integer|null

Type

integer|null

$roles

$roles : \Illuminate\Database\Eloquent\Collection|array<mixed,\Spatie\Permission\Models\Role>

Type

\Illuminate\Database\Eloquent\Collection|array<mixed,\Spatie\Permission\Models\Role>

$roles_count

$roles_count : integer|null

Type

integer|null

$users

$users : \Illuminate\Database\Eloquent\Collection|array<mixed,\App\Models\User>

Type

\Illuminate\Database\Eloquent\Collection|array<mixed,\App\Models\User>

$users_count

$users_count : integer|null

Type

integer|null

$logName

$logName : 

Type

$logUnguarded

$logUnguarded : 

Type

Methods

getList()

getList(array  $data) : array

获取列表

Parameters

array $data

Returns

array

__deleted()

__deleted(integer  $id) : array

删除权限

Parameters

integer $id

Throws

\Exception

Returns

array

tree()

tree(array  $data) : array

树形结构

Parameters

array $data

Returns

array

drop()

drop(integer  $dragging, integer  $drop, string  $type) : boolean

修改目录排序与层级

Parameters

integer $dragging

被操作者的ID

integer $drop

操作的ID

string $type

操作类型

Returns

boolean

newModelQuery()

newModelQuery() : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

newQuery()

newQuery() : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

permission()

permission(mixed  $permissions) : \Illuminate\Database\Eloquent\Builder|\Spatie\Permission\Models\Permission

Parameters

mixed $permissions

Returns

\Illuminate\Database\Eloquent\Builder|\Spatie\Permission\Models\Permission

query()

query() : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

role()

role(mixed  $roles, mixed  $guard = null) : \Illuminate\Database\Eloquent\Builder|\Spatie\Permission\Models\Permission

Parameters

mixed $roles
mixed $guard

Returns

\Illuminate\Database\Eloquent\Builder|\Spatie\Permission\Models\Permission

whereComponent()

whereComponent(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

whereCreatedAt()

whereCreatedAt(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

whereGuardName()

whereGuardName(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

whereHidden()

whereHidden(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

whereIcon()

whereIcon(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

whereId()

whereId(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

whereName()

whereName(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

wherePath()

wherePath(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

wherePid()

wherePid(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

whereSort()

whereSort(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

whereTitle()

whereTitle(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission

whereUpdatedAt()

whereUpdatedAt(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Models\Permission

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Models\Permission