Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

medcharrafi's avatar

how i can display the data of the pivot table in filament

I'm working on a project that involves a tasks table and an employees table with a many-to-many relationship managed by a pivot table. In this pivot table, I'm storing various data such as time consumed, user roles, task types, and more.

My goal is to create an analytics dashboard using Filament to display this data in a table format. The table should serve as a read-only view, showcasing insights into tasks, time consumption, and employee roles without the need for editing or deleting.

I'm curious to know if Filament supports this idea, and if so, how I can implement it. If Filament doesn't align with this approach, I'm open to suggestions for alternative solutions.

Any advice or guidance on structuring the dashboard and utilizing Filament for this analytics display would be greatly appreciated

0 likes
3 replies
aurawindsurfing's avatar
Level 50

Hi @medcharrafi

It supports it fully and even has a good documentation about it. Have a look here: https://filamentphp.com/docs/3.x/panels/resources/relation-managers#listing-with-pivot-attributes

You can customise attach and detach actions as you wish. You can also store additional pivot attributes on your pivot table this way.

Ar per your wider question - filament has nothing to do with it. It is how you structure your models and logic.

anonnoone's avatar

Hi @medcharrafi Pivot data can be displayed on a table column by refrencing the pivot attribute in the component make method

TextColumn::make('pivot.created_at')
1 like
PeterWilliam's avatar

@anonnoone That's right, but sorting and searching leads to an error: "column pivot not found". Any idea how this can work? best regards

Please or to participate in this conversation.