*/ public function toArray(Request $request = null): array { $lists = []; foreach ($this->resource['ITEM'] as $v) { $lists[] = [ 'type_name' => $v['TYPENAME'], 'item_name' => $v['COSTNAME'], 'unit' => $v['UNIT'], 'spec' => $v['COSTSPEC'], 'price' => $v['PRICE'], 'cd_name' => $v['CDNAME'] ?? '', ]; } return $lists; } }