mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 12:43:52 +08:00
Eager load mentionedBy and only missing relations (#64)
This commit is contained in:
parent
613664525d
commit
46aabd2ae5
|
@ -66,7 +66,7 @@ class FilterVisiblePosts
|
|||
// Load all of the users that these posts mention. This way the data
|
||||
// will be ready to go when we need to sub in current usernames
|
||||
// during the rendering process.
|
||||
$posts->load(['mentionsUsers', 'mentionsPosts.user']);
|
||||
$posts->loadMissing(['mentionsUsers', 'mentionsPosts.user', 'mentionedBy']);
|
||||
|
||||
// Construct a list of the IDs of all of the posts that these posts
|
||||
// have been mentioned in. We can then filter this list of IDs to
|
||||
|
|
Loading…
Reference in New Issue
Block a user