How to display the users separately in the table row
Hello,
I have a table called users which has belongstomany relationship with companies table.
The table I am using shows users in the same row for each company and because of this I am not able to add togglecolumn for each user for those companies.
Please let me know how can I display the users in different row for each company and also be able to add togglecolumn which can I use to update user roles?
Thank you
5 Replies
you could use a relation manager
https://filamentphp.com/docs/3.x/panels/resources/relation-managers
Thank you so much.
I was trying to make it as a separate resource page, but I think relation manager would work fine.
Hi @Leandro Ferreira I am now using the relation manager but I am having a slight issue with loading the roles inside SelectColumn
Please check the screenshots, I am not able to load the roles.
The roles are with spatie roles and permissions package and also using teams as true for spatie package.
I managed to get the roles in the list using the setPermissionsTeamId but I am not able to save the roles now 😦
please let me know if this is the right way of doing this on relation manager? it works and I only have to assign single role to each user for each company/team