ImageColumn and multiple avatars
shouldnt
ImageColumn::make('belongsToManyRelationship.avatar')
work? according to the docs, it looks like it should. Now all avatars would be defaults, but I checked with tinker and each of the relationships do return the avatar url, but not getting anything in the column. If I try using getStateUsing() to troubleshoot it, it says it only handles a string, which I would think wouldn’t be the case for multiple image support.12 Replies
are you getting null in the column or is the image being shrunk down by styling so that it looks like it isn't there?
hmm, just empty . So if i do a TextColumn::make('belongsToManyRelationship.avatar'), i dont get anything either. I would think that would list the urls. If i do TextColumn::make('belongsToManyRelationship.name'), it does show the name
weird
and it's a stored column on the model?
or is
avatar
an attribute on the modelattribute
Solution
looks like i had to append it like so:
to the model
that was my next question
why is it sometimes required and others not to access the attribute?
i honestly don't know.
it has frustrated me before too.
Are you defining it the the
Attribute
cast or the old way?had to do to get avatars to work outside the panel
just wondering if this still requires the
appends
:
It probably does, i'm just curious though.nope. no biggie though