Get a pivot column in a list?
Tables\Columns\TextColumn::make('connections.pivot.synchronized_at')
->label('Synced at')
->dateTime()
->sortable(),
Doesn't work.
when I use a repeatableEntry column I can get it but not in table?
3 Replies
tried make('pivot.sychronised_at') as well.
when I load my client in tinker the connections is there with a pivot. not sure why filament ignores it. I have it in my relationship manager.
I'm not sure if it was a typo but you wrote "pivot.syncroniSed_at". Btw, when you want to list pivot values inside a table, be sure to specify these values with
withPivot
in your related Models.
https://filamentphp.com/docs/4.x/resources/managing-relationships#listing-with-pivot-attributes@Oscar Carvajal Mora my relation does have withPivot
When using tinker and I select out a client the connections is shown if I dump the client in filemant only another relation is loaded even though I have a connectionsRelationManager setup...
I gave up trying to get it to work.