Show table actions on view page instead of edit page.
What I am trying to do:
Currently my
CreateAction
button is only shown on the relationship table when editing the parent record. I want to show this button when viewing the parent record.
What I did:
I currently only found one solution and that is to add the ->authorize()
method on the action.
My issue/the error:
I want to know if there is a (general) setting to show the buttons on the view page instead of the edit page.
Code:
Solution:Jump to solution
Seems like this is the right solution:
->readOnlyRelationManagersOnResourceViewPagesByDefault(false);
https://filamentphp.com/docs/4.x/resources/managing-relationships#read-only-mode...2 Replies
Seems like this works:
Is it recommended to do it this way?
Solution
Seems like this is the right solution:
->readOnlyRelationManagersOnResourceViewPagesByDefault(false);
https://filamentphp.com/docs/4.x/resources/managing-relationships#read-only-mode