Skip to content

Commit

Permalink
Fix onCloned
Browse files Browse the repository at this point in the history
This should fix the #34 issue where onCloned is called too early.
  • Loading branch information
Putr authored Aug 28, 2020
1 parent 34e6dc5 commit eb999fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Cloner.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ public function duplicate($model, $relation = null) {
$this->duplicateAttachments($model, $clone);
$clone->save();

$this->dispatchOnClonedEvent($clone, $model);

$this->cloneRelations($model, $clone);


$this->dispatchOnClonedEvent($clone, $model);

return $clone;
}

Expand Down

0 comments on commit eb999fe

Please sign in to comment.