F
Filament15mo ago
Tieme

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
toeknee15mo ago
I am not sure I follow, please explain a bit more
Tieme
TiemeOP15mo 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
toeknee15mo ago
You know we can't view them right? So you want to hit the relation manage on the edit page
Tieme
TiemeOP15mo ago
Changed the urls to documentation pages of viewing /editthing. Yes, i want to hide the ralation manager on the edit page.
Solution
toeknee
toeknee15mo ago
On the EditRecord Page add:
protected function getRelationManagers(): array
{
return [];
}
protected function getRelationManagers(): array
{
return [];
}
Does that work
Tieme
TiemeOP15mo ago
Is it that easy.. Yes it works if i make function public, Thanks
Want results from more Discord servers?
Add your server