Relation managers (Hide on edit page)

Hi All, Maybe I looked over it, but how can i hide the Relation tables on the edit page of the parent record? It needs to be vissble only on the view of the parent. Thanks.
Solution:
On the EditRecord Page add: ```php protected function getRelationManagers(): array { return [];...
Jump to solution
6 Replies
toeknee
toeknee2y ago
I am not sure I follow, please explain a bit more
Tieme
TiemeOP2y ago
View : https://filamentphp.com/docs/3.x/panels/resources/viewing-records Show de relations attached to it. Edit : https://filamentphp.com/docs/3.x/panels/resources/editing-records Hide de relations attached to it. So it will only show me the form of the company and no contacts / projects raltions
toeknee
toeknee2y ago
You know we can't view them right? So you want to hit the relation manage on the edit page
Tieme
TiemeOP2y ago
Changed the urls to documentation pages of viewing /editthing. Yes, i want to hide the ralation manager on the edit page.
Solution
toeknee
toeknee2y ago
On the EditRecord Page add:
protected function getRelationManagers(): array
{
return [];
}
protected function getRelationManagers(): array
{
return [];
}
Does that work
Tieme
TiemeOP2y ago
Is it that easy.. Yes it works if i make function public, Thanks

Did you find this page helpful?