Laravel Eloquent groupBy() AND also return count of each group
Are you tired of manually grouping your Laravel Eloquent data? Do you want an easier way to group your data and also get a count of each group? Look no further than the `groupBy()` function in Laravel Eloquent! Before we dive into the `groupBy()` function, let's first talk about what Laravel Eloquent is. Laravel Eloquent is an Object Relational Mapping (ORM) system that allows you to work with databases in an object-oriented way. It provides a simple and elegant syntax for working with databases, making it easy to perform common tasks such as querying, updating, and deleting data. The `groupBy()` function in Laravel Eloquent is a powerful tool that allows you to group your data based on a specific column or set of columns. It groups your data into separate collections, each containing all the rows with a matching value in the specified