refactor: 修改数组转树状结构封装
This commit is contained in:
@@ -24,7 +24,7 @@ if (!function_exists('array_to_tree')) {
|
||||
if ($keep_pid === false) {
|
||||
unset($item[$with]);
|
||||
}
|
||||
$children = array_to_tree($data, $item['id'], $with, $lv);
|
||||
$children = array_to_tree($data, $item['id'], $with, $lv, $keep_pid);
|
||||
if ($children) {
|
||||
$item['children'] = $children;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user