counts not working on relationship
I'm trying to add a column that shows a count of the related records. This code correctly displays JSON output of the related records, so I know it's getting them correctly, but counts() doesn't work.
This gets results from the relationship:
This fails with: Call to a member function goals() on null
Here are the relationships:
Where am I going wrong?
This gets results from the relationship:
This fails with: Call to a member function goals() on null
Here are the relationships:
Where am I going wrong?