*/ public function toArray(Request $request = null): array { $this->resource = xmlArrayToListByKey($this->resource, 'ITEM'); $lists = []; foreach ($this->resource['ITEM'] as $v) { $lists[] = [ 'dept_id' => $v['DEPID'], 'dept_name' => $v['DEPNAME'], 'dept_intro' => $v['INTRODUCE'] ]; } return $lists; } }