We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ee8c99 commit 0403071Copy full SHA for 0403071
src/plugin/admin/app/controller/RuleController.php
@@ -86,7 +86,10 @@ function get(Request $request): Response
86
$this->removeNotContain($tree_items, 'id', $rules);
87
}
88
$this->removeNotContain($tree_items, 'type', $types);
89
- return $this->json(0, 'ok', Tree::arrayValues($tree_items));
+ $menus = array_filter(Tree::arrayValues($tree_items), function ($item) {
90
+ return count($item['children']);
91
+ });
92
+ return $this->json(0, 'ok', $menus);
93
94
95
/**
0 commit comments