mercredi 26 avril 2017

Laravel 5: Need to sort a grouped collection by an attribute of first item of each group

I have a collection of some Eloquent model items from my database which are grouped by an attribute using groupBy(), I need to sort that collection by another attribute of the first item of each group but preserve the initial structure. How can I achieve this, if possible at all?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2pm73HD
via IFTTT

Aucun commentaire:

Enregistrer un commentaire