fix: n+1 comments

- add eager loading for user group
This commit is contained in:
HDVinnie
2023-04-16 00:00:04 -04:00
parent 818dd4f40a
commit b9e298a822
+1 -1
View File
@@ -135,7 +135,7 @@ class Comments extends Component
{
return $this->model
->comments()
->with('user', 'children.user', 'children.children')
->with('user', 'user.group', 'children.user', 'children.user.group', 'children.children')
->parent()
->latest()
->paginate($this->perPage);