src/Leevel/Tree/Tree.php
public function getChild($id): array
    {
        $data = [];

        foreach ($this->map as $key => $parent) {
            if ((string) $parent === (string) $id) {
                $data[$key] = $key;
            }
        }

        return $data;
    }
public function getChild($id): array
    {
        $data = [];

        foreach ($this->map as $key => $parent) {
            if ((string) $parent === (string) $id) {
                $data[$key] = $key;
            }
        }

        return $data;
    }
取得给定 ID 一级子树 ID.

@param int|string $id

@return array