orderByRaw not working (anymore) #48205
Unanswered
francoism90
asked this question in
Q&A
Replies: 1 comment
-
|
By not limiting the search, it works as expected, and I get the same result every time: $models = $this->getModel()->search($value);This does not work, as it seems to change the result: $models = $this->getModel()->search($value, 10);It's really weird, but I think this happens because the collection length isn't the same. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I don't know what I'm doing wrong:
Results:
This is direct search:
As you can see the keys (order) is being reset/sorted, but I don't have any idea why?
If I use
orderBy('id', 'DESC'), it works fine, but it doesn't seem to parseorderByRaw(anymore)?Do I miss something? Like
preserveKeys? It doesn't matter if I useget()directly withoutpluck, the order is always (unwanted) sorted.Thanks
Beta Was this translation helpful? Give feedback.
All reactions