Replicate with relational data?
Is it possible to use the replicate function with replicating relationship data? I can write my own replicate action, but I am hoping there is a method with relationships or similar.
Solution:Jump to solution
i use this in my after to replicate my relation data.
```php
->after(function (Model $original, Model $replica): void {
// Runs after the replica has been saved to the database....
4 Replies
Did you find anything?
I just built it out myself in the end, It didn't seem possible out of the box
You probably need to use the
->after()
hook, if that's possibleSolution
i use this in my after to replicate my relation data.