F
Filamentβ€’15mo ago
Nuhel

How to perform action before saving relationships?

I am trying to perform an action before saving relationships. I tried using afterValidate/ befoerCreate but before firing those hooks relationship data is getting updated.
3 Replies
JonVonWeston
JonVonWestonβ€’15mo ago
Hiya - I've latched into mutateFormDataBeforeSave - I was able to add and remove items from the data array before it was all persisted. I'm assuming you could do whatever you need to do at that point? This was in the 'Edit' page of my resource
blakdronzer
blakdronzerβ€’15mo ago
yes - this is a point i will like to alter the data - add / remove a certain element if required .. compute a certain stuff before it actually gets stored in finally
JonVonWeston
JonVonWestonβ€’15mo ago
πŸ‘
Want results from more Discord servers?
Add your server