RelationManager afterSave() Question
I can get afterSave to work when added to the edit page of a resource, but I can't seem to get it working when added to the ResourceManage page.
I assume I've missed something obvious.
Any help appreciated.
4 Replies
I'm not sure if I'm being too specific with this question so here it is another way...
I need to add an action when a RelationManager page field is updated. What's the best way of doing this? afterSave doesn't work, like it does in the usual Edit resource pages.
what kind of action?
Insert data into another table + call a web hook via Spatie. Both of these actions I have running on non-relationship resources already.
RelationManager class has actions. You can use this in the action
https://filamentphp.com/docs/3.x/actions/prebuilt-actions/edit/#lifecycle-hooks