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
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
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
π