Skip to content

Commit 5a2fcac

Browse files
authored
[8.x] Fix BelongsToMany field not saving (#751)
1 parent 0f5c8fd commit 5a2fcac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Relationships.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function save(): void
3737
->filter(fn (Field $field) => $field->fieldtype() instanceof HasManyFieldtype)
3838
->each(function (Field $field): void {
3939
$relationshipName = $this->model->runwayResource()->eloquentRelationships()->get($field->handle());
40-
$values = $this->values[$relationshipName] ?? [];
40+
$values = $this->values[$field->handle()] ?? [];
4141

4242
match (get_class($relationship = $this->model->{$relationshipName}())) {
4343
HasMany::class => $this->saveHasManyRelationship($field, $relationship, $values),

0 commit comments

Comments
 (0)