mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 02:13:37 +08:00
Don't imply order on posts relationship
This commit is contained in:
parent
8e5cbcd196
commit
e30ae7b7b8
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user