each( function ($item) use (&$data, &$index) { $oldItem = (new ParkingSpaceService( new OperationLogService() ))->optionItems($item); $data[] = [ 'id' => $oldItem['id'], 'floor' => $oldItem['floor'], 'number' => $oldItem['number'], 'space_attr' => $oldItem['space_attr'], 'license_plate' => $oldItem['license_plate'], 'berthing_time' => $oldItem['berthing_time'], 'recognition' => $oldItem['recognition'], 'status' => $oldItem['status'], 'space_type' => $oldItem['space_type'], 'operation_type' => $oldItem['operation_type'], 'updated_at' => $oldItem['updated_at'] ]; $index += 1; } ); return $data; } /** * @return array */ public function headings(): array { return [ __('exports.global.index'), __('exports.parking_space.floor'), __('exports.parking_space.number'), __('exports.parking_space.space_attr'), __('exports.parking_space.license_plate'), __('exports.parking_space.berthing_time'), __('exports.parking_space.recognition'), __('exports.parking_space.status'), __('exports.parking_space.space_type'), __('exports.parking_space.operation_type'), __('exports.parking_space.updated_at') ]; } }