name = $response['descriptor']; $group->id = $response['id']; return $group; } public function toArray() { return [ 'id' => $this->id, 'name' => $this->name ]; } public function subgroups() { return Nami::subgroupsOf($this->id); } }