mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 06:53:47 +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.
|
// assign the tags data to it using an event listener.
|
||||||
$data['tags'] = Tag::whereVisibleTo($actor)
|
$data['tags'] = Tag::whereVisibleTo($actor)
|
||||||
->withStateFor($actor)
|
->withStateFor($actor)
|
||||||
->with(['parent', 'lastPostedDiscussion'])
|
->with([
|
||||||
|
'parent',
|
||||||
|
'lastPostedDiscussion',
|
||||||
|
'lastPostedDiscussion.tags',
|
||||||
|
'lastPostedDiscussion.state'
|
||||||
|
])
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user