Column avg() not working? I'm sure i'm missing something
I don't know if I'm missing something but...
I have model Review with relations:
then Product model:
In Review resource I have this:
In avg column I have nothing but when I'm using query builder
withAvg
i'm getting in review ($record) object. What I'm missing with this column avg() ?2 Replies
Probably this note from the docs:
In this example, users is the name of the relationship, while age is the field that is being averaged. The name of the column must be users_avg_age, as this is the convention that Laravel uses for storing the result.https://filamentphp.com/docs/3.x/tables/columns/relationships#aggregating-relationships
Solution
Oh... thanks π