sktklaus
10 months ago

Eloquent avg on nested items

Posted 10 months ago by sktklaus
 $status = Company::with('members',  'members.tasks', 'members.tasks.rating')->findOrFail(1);

my ratings has a column score, how can I add the avg score to every members in this query?

Please sign in or create an account to participate in this conversation.