Table column that shows Pivo columns

I can't get pivot columns to show up in a table.

Not sure what I'm doing wrong.

when I print the column of the relationship, it shows the pivot data in json form so its got the data. But if I do "connections.pivot_column" nothing shows.
"connections.pivot.column" doesn't work.

I created a relationship manager.

the relation has withPivot.

Not sure what I'm missing.

The docs don't really show how to do it.

                Tables\Columns\TextColumn::make('connections.synchronized_at')
                ->label('Sync at'),

    public function connections():belongsToMany
    {
        return $this->belongsToMany(Connection::class,'client_connection','client_id','connection_id')->withPivot('is_synchronized','synchronized_at','custom_id');
    }
Was this page helpful?