\App\Repositories\EloquentMenuRepositoryEloquent

Class MenuRepositoryEloquent

Summary

Methods
Properties
Constants
model()
boot()
createMenu()
updateMenu()
getChildMenu()
getAllMenu()
getParentMenu()
delAllMenu()
saveMenuOrder()
setMenuAllCache()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$menu_ids
N/A

Properties

$menu_ids

$menu_ids : 

Type

Methods

model()

model() : string

Specify Model class name

Returns

string

boot()

boot() 

Boot up the repository, pushing criteria

createMenu()

createMenu(integer  $parent_id, object  $request) : array

保存菜单

Parameters

integer $parent_id
object $request

Returns

array

updateMenu()

updateMenu(integer  $id, object  $request) : array

更新菜单

Parameters

integer $id
object $request

Returns

array

getChildMenu()

getChildMenu(integer  $parent_id) 

获取子菜单

Parameters

integer $parent_id

getAllMenu()

getAllMenu(integer  $parent_id) : array

递归查询子分类

Parameters

integer $parent_id

父类ID

Returns

array

getParentMenu()

getParentMenu(  $condition) 

查询父ID

Parameters

$condition

delAllMenu()

delAllMenu(integer  $id) 

递归删除菜单

Parameters

integer $id

saveMenuOrder()

saveMenuOrder(object  $menus, integer  $parent_id) 

保存菜单排序

Parameters

object $menus
integer $parent_id

setMenuAllCache()

setMenuAllCache() : boolean

生成菜单缓存

Returns

boolean