-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eloquent orderBy not working. #18
Comments
The orderBy seems to be set in the Post model on line 102. I would suggest this is unnecessary and breaks if you want to order by anything else. |
For a super hacky temp fix you can get the Query object and just unset the order: $posts = Post::published();
$query = $posts->getQuery();
unset($query->orders[0]);
$posts->setQuery($query);
$posts = $posts->orderBy('post_date', 'asc')->get(); |
Also, you might want to have a look at the dev branch... it has already been fixed there |
Hey guys! Thanks for the support. We're fixing these bugs and it will be merged soon to the master branch. Wait for good news for Corcel :-) |
Am I just missing something or is orderBy not supported by corcel?
I am trying to arrange some custom post types from oldest to newest, but the normal eloquent orderBy seems to have no effect on the order of the outputted posts.
The text was updated successfully, but these errors were encountered: