Skip to content

Commit

Permalink
fix: 菜单管理, 父级菜单不能选择自己
Browse files Browse the repository at this point in the history
  • Loading branch information
slowlyo committed Jun 11, 2024
1 parent fe8e0b0 commit b51bdbb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Services/AdminMenuService.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public function getTree()

public function parentIsChild($id, $parent_id)
{
if($id == $parent_id){
return true;
}

$parent = $this->query()->find($parent_id);

do {
Expand Down

0 comments on commit b51bdbb

Please sign in to comment.