Pivot data in model/resource table
Hi.
I have Product model with relation:
I tried to show
purchasable
in resource table but without success. I added column:
but it is always empty. When i change it to customerGroups.name
the I get those names.
I even tried to dump $state
inside of color()
method. I started with just customerGroups
and I got this:
and then if i tried customerGroups.pivot
or customerGroups.pivot.purchasable
I got nothing - like dd()
even not fired2 Replies
how about creating a hasmany to the pivot table
then using hasmanyrelationname.purchasable
That works, thanks π