mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 22:43:41 +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…
Reference in New Issue
Block a user