collection->map(function ($xmlInco) { return [ 'label' => $xmlInco->nice_string, 'value' => $xmlInco->id, 'no_art' => $xmlInco->no_art, 'prod_saison' => $xmlInco->prod_saison, 'allegations' => $xmlInco->allegations, 'conseil_prepa' => $xmlInco->conseil_prepa, 'astuces' => $xmlInco->astuces, 'descriptif' => $xmlInco->descriptif, 'arg_vente' => $xmlInco->arg_vente, 'nb_portion' => $xmlInco->nb_portion, 'typ_portion' => $xmlInco->typ_portion, 'pds_moy_theo' => $xmlInco->pds_moy_theo, 'lib_conso' => $xmlInco->lib_conso, 'lst_ing' => $xmlInco->lst_ing, 'nutritional_values' => $xmlInco->nutritional_values, 'picture' => $xmlInco->picture, ]; })->all(); } }