You may mutate the data for a new related item before it is created in the database using the mutateRelationshipDataBeforeCreateUsing() method.
This method accepts a closure that receives the current item's data in a $data variable.
You can choose to return either the modified array of data, or null to prevent the item from being created:
When I finished my A’ levels, all of my friends were planning to go abroad for their higher studies and I was no exception. It was a seemingly easy choice to make at the time and I really wanted to enjoy my Bachelor’s Degree with my friends. Things were all well and good before I started working.
When I finished my A’ levels, all of my friends were planning to go abroad for their higher studies and I was no exception.
When I finished my A’ levels, all of my friends were planning to go abroad for their higher studies and I was no exception. It was a seemingly easy choice to make at the time.
When I finished my A’ levels, all of my friends were planning to go abroad for their higher studies and I was no exception.