mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
perf: Eager load actor tag states (#143)
This commit is contained in:
@@ -42,6 +42,7 @@ class LoadForumTagsRelationship
|
|||||||
->limit(4) // We get one more than we need so the "more" link can be shown.
|
->limit(4) // We get one more than we need so the "more" link can be shown.
|
||||||
)
|
)
|
||||||
->whereVisibleTo($actor)
|
->whereVisibleTo($actor)
|
||||||
|
->withStateFor($actor)
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -34,6 +34,7 @@ use Illuminate\Database\Eloquent\Builder;
|
|||||||
* @property int $last_posted_discussion_id
|
* @property int $last_posted_discussion_id
|
||||||
* @property int $last_posted_user_id
|
* @property int $last_posted_user_id
|
||||||
* @property string $icon
|
* @property string $icon
|
||||||
|
* @property TagState
|
||||||
*/
|
*/
|
||||||
class Tag extends AbstractModel
|
class Tag extends AbstractModel
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user