prouse_
Same field in all forms/resources
I think it's more than just adding to all the forms. Because all resources that have this also needs to add in the table, and then also in the filters would be preferable. That's 3 places per resource now at least where we need to repeat the same code. So in that sense a trait or being able to extend a specific class would make it much cleaner.
9 replies
Same field in all forms/resources
Ideally we want to avoid needing to add the component into each form and then also the column into each table.
Would like to achieve it in a more elegant way. For example like how you can use traits in Laravel models and boot into it. Just adding a trait to the resource. Or extend CompanyResource or just add a property to the Resource.
I can't find any way though without overriding and changing too much of the core.
9 replies
Admin and super admin
A video about this would be great!
We have multi tenancy.
My main concern is basically. Should we use multiple panels? And if yes, how do we best reuse the fields/logic. Extending the resources or making classes for the fields which we can reuse?
And if we do not do multiple panels. How do we best make a clear seperation between regular fields and super admin fields.
18 replies
Admin and super admin
Thanks for your reply.
I definitely agree with you about not wanting to change to much structure. That's why I'm wondering what is the best way to achieve this in Filament.
The tests is a good way to ensure of course. But it's still easy for a new team member to add a new field and forget to make it hidden for regular users and also write test for it.
I'm looking for a way where we can put a clear seperation between the admin fields and super admin fields. Do you have any idea on the best way to achieve that?
18 replies
Admin and super admin
The visible solution I don't like since it's easy for a new team member to add a new super admin field and then forget about the is visible since all is in the same class/file. So somehow I am looking for a solution that puts a clear seperation between the regular fields and super admin fields.
18 replies