Make sure discussion post IDs are ordered correctly

This commit is contained in:
Toby Zerner 2015-06-24 18:57:07 +09:30
parent aae40472cf
commit 4c8a60ed7a

View File

@ -92,7 +92,7 @@ class ShowAction extends SerializeResourceAction
$discussion = $this->discussions->findOrFail($request->get('id'), $user);
$discussion->posts_ids = $discussion->visiblePosts($user)->lists('id');
$discussion->posts_ids = $discussion->visiblePosts($user)->orderBy('time')->lists('id');
if (in_array('posts', $request->include)) {
$length = strlen($prefix = 'posts.');