Skip to content

Conversation

scrummitch
Copy link
Contributor

@scrummitch scrummitch commented Jan 25, 2022

Hi there, this is my first laravel PR

The $user->allTeams() method returns a merged collection in the HasTeams trait with $this->ownedTeams and $this->teams.

Unfortunately eloquent sortBy method will re-index the keys out of order, so json encoding the output value of this method will convert it to a map in javascript rather than an array.

The `$request->user()->allTeams()` method returns a merged collection in the HasTeams trait with `$this->ownedTeams` and `$this->teams`.

Unfortunately eloquent `sortBy` method will re-index the keys out of order, so json encoding the output value of this method will convert it to a map in javascript rather than an array.
@taylorotwell taylorotwell merged commit 3fa1ce6 into laravel:2.x Jan 25, 2022
@driesvints
Copy link
Member

Thanks @scrummitch!

@scrummitch scrummitch deleted the patch-1 branch January 25, 2022 23:33
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.

3 participants