mirror of https://gitee.com/karson/fastadmin.git
根据名称获取规则IDS排序优化
parent
d375f0c6fd
commit
308d008292
|
|
@ -134,7 +134,7 @@ class Menu
|
|||
if ($menu)
|
||||
{
|
||||
// 必须将结果集转换为数组
|
||||
$ruleList = collection(AuthRule::order('weigh', 'desc')->field('id,pid,name')->select())->toArray();
|
||||
$ruleList = collection(AuthRule::order('weigh', 'desc')->order('id', 'asc')->field('id,pid,name')->select())->toArray();
|
||||
// 构造菜单数据
|
||||
$ids = Tree::instance()->init($ruleList)->getChildrenIds($menu['id'], true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue