Examples of Collection Methods: MapToGroups (1)

Short information about mapToGroups

The mapToGroups method groups the collection's items by the given closure. The closure should return an associative array containing a single key / value pair, thus forming a new collection of grouped values.
Read more in the official Laravel docs.

Repository: tighten/laravelversions (Github)
★ 83 Created: Jan 2021 Updated: Jul 2022 Laravel version: 8
Files in the example:
- app/Console/Commands/FetchLatestReleaseNumbers.php