Repeater Relationship not ready on afterCreate()
Hello,
I have a Model Resource with a repeater relationship in it, however when I try to do some data processing from a event fired from afterCreate() it appears the relationship data is NOT ready, so I presume this is ran before relationships is saved. What is the best way around this?
I've tried afterCreate() in the CreateModel.php file
3 Replies
I think you can use
$this->record->your_relationship
in the afterCreate
methodI have tried that but it returns empty sadly.
You can add
->dehydrated()
to the repeater, but you need to save the data manually.