*/ public function toArray(Request $request = null): array { $lists = []; foreach ($this->resource as $v) { $lists[] = [ 'patient_id' => $v['patient_id'], 'patient_name' => $v['name'], 'is_default' => $v['def_status'] ]; } return $lists; } }