mirror of
https://github.com/flarum/core.git
synced 2025-08-12 03:14:33 +02:00
Eagerload lastPostedDiscussion needed relationships (#120)
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user