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