You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Mdpproduction have you tried accessing it through the entity?
$this->entity->posts()->count()
Make sure when you're querying the relationship with the sole purpose of counting it, to have access "posts" as a method, as above since that will only generate one "SELECT COUNT(*)" query, whereas
$this->entity->posts->count
would fetch all posts related to that entity and count them.
Hi guys i don't know why but if inside the presenter class i try to access like a method on relationship model
$this->relations()->count()
i get an error message on method 'Call to undefined method'. Why ?
The text was updated successfully, but these errors were encountered: