Skip to content

Commit

Permalink
Use fromRawAttributes() for custom pivot models (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin authored Jul 29, 2024
1 parent c11b2ba commit 339af87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ public function newRelationPivot($relationName, $parent, $attributes, $table, $e

if (!is_null($definition) && array_key_exists('pivotModel', $definition)) {
$pivotModel = $definition['pivotModel'];
return $pivotModel::fromAttributes($parent, $attributes, $table, $exists);
return $pivotModel::fromRawAttributes($parent, $attributes, $table, $exists);
}
}

Expand Down

0 comments on commit 339af87

Please sign in to comment.