Skip to content

Keep original keys when using Collection->sortBy() with an array of sort operations - #43609

Merged
taylorotwell merged 2 commits into
laravel:9.xfrom
arthurperton:pr/sortby-keep-keys
Aug 9, 2022
Merged

taylorotwell merged 2 commits into
laravel:9.xfrom
arthurperton:pr/sortby-keep-keys

Conversation

@arthurperton

Copy link
Copy Markdown
Contributor

Fixes #43608 by using uasort() instead of usort().

@arthurperton arthurperton changed the title Keep original keys when using Collection->sortBy() with array of sort operations Keep original keys when using Collection->sortBy() with an array of sort operations Aug 9, 2022
@taylorotwell
taylorotwell merged commit 7094bc1 into laravel:9.x Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collection: sortBy() on multiple attributes doesn't keep original keys

3 participants