mirror of
https://github.com/flarum/framework.git
synced 2025-02-24 01:34:10 +08:00
Lazy-load any included relationships on /api/tags
This commit is contained in:
parent
f61d834a76
commit
c2fe1fdce5
@ -57,7 +57,10 @@ class ListTagsController extends AbstractCollectionController
|
||||
protected function data(ServerRequestInterface $request, Document $document)
|
||||
{
|
||||
$actor = $request->getAttribute('actor');
|
||||
$include = $this->extractInclude($request);
|
||||
|
||||
return $this->tags->whereVisibleTo($actor)->withStateFor($actor)->get();
|
||||
$tags = $this->tags->whereVisibleTo($actor)->withStateFor($actor)->get();
|
||||
|
||||
return $tags->load($include);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user