Skip to content

Commit

Permalink
Fix saving hook
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Feb 20, 2024
1 parent 593a736 commit b935fed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Traits/HasRichText.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected static function bootHasRichText()
}

static::saving(function (Model $model) {
foreach ($model->getRichTextFields() as $field) {
foreach ($model->getRichTextFields() as $field => $_options) {
$relationship = static::fieldToRichTextRelationship($field);

if ($model->relationLoaded($relationship) && $model->{$field}->isDirty() && $model->timestamps) {
Expand Down

0 comments on commit b935fed

Please sign in to comment.