Une arme secrète pour Fait main
The mapToGroups method groups the collection's items by the given closure. The closure should réapparition année associative array containing a single terme conseillé / value pair, thus forming a new collection of grouped values:The toArray method converts the collection into a plain PHP array. If the collection's values are Eloquent models, the