mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 16:24:27 +08:00
Eagerload lastPostedDiscussion needed relationships (#120)
This commit is contained in:
parent
162167fe23
commit
b78b097724
@ -29,7 +29,12 @@ class LoadForumTagsRelationship
|
||||
// assign the tags data to it using an event listener.
|
||||
$data['tags'] = Tag::whereVisibleTo($actor)
|
||||
->withStateFor($actor)
|
||||
->with(['parent', 'lastPostedDiscussion'])
|
||||
->with([
|
||||
'parent',
|
||||
'lastPostedDiscussion',
|
||||
'lastPostedDiscussion.tags',
|
||||
'lastPostedDiscussion.state'
|
||||
])
|
||||
->get();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user