mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 05:32:49 +08:00
Performance: Load only basic information about lastDiscussion
This commit is contained in:
parent
6a21d292c5
commit
89f417097b
|
@ -12,7 +12,7 @@
|
||||||
namespace Flarum\Tags\Api\Serializer;
|
namespace Flarum\Tags\Api\Serializer;
|
||||||
|
|
||||||
use Flarum\Api\Serializer\AbstractSerializer;
|
use Flarum\Api\Serializer\AbstractSerializer;
|
||||||
use Flarum\Api\Serializer\DiscussionSerializer;
|
use Flarum\Api\Serializer\DiscussionBasicSerializer;
|
||||||
|
|
||||||
class TagSerializer extends AbstractSerializer
|
class TagSerializer extends AbstractSerializer
|
||||||
{
|
{
|
||||||
|
@ -64,6 +64,6 @@ class TagSerializer extends AbstractSerializer
|
||||||
*/
|
*/
|
||||||
protected function lastDiscussion($tag)
|
protected function lastDiscussion($tag)
|
||||||
{
|
{
|
||||||
return $this->hasOne($tag, DiscussionSerializer::class);
|
return $this->hasOne($tag, DiscussionBasicSerializer::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user