Don't imply order on posts relationship

This commit is contained in:
Toby Zerner 2015-02-10 17:53:16 +10:30
parent 8e5cbcd196
commit e30ae7b7b8
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ class DiscussionSerializer extends DiscussionBasicSerializer
*/
public function linkPosts(Discussion $discussion)
{
return (new PostBasicSerializer)->collection($discussion->posts()->whereCanView()->ids());
return (new PostBasicSerializer)->collection($discussion->posts()->whereCanView()->orderBy('time', 'asc')->ids());
}
/**

View File

@ -106,7 +106,7 @@ class Discussion extends Entity
public function posts()
{
return $this->hasMany('Flarum\Core\Posts\Post')->orderBy('time', 'asc');
return $this->hasMany('Flarum\Core\Posts\Post');
}
public function comments()