mirror of
https://github.com/flarum/core.git
synced 2025-08-18 14:22:02 +02:00
Lazy-load any included relationships on /api/tags
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user