Skip to content

Commit a73ca67

Browse files
committed
change in update too
1 parent c013626 commit a73ca67

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/app/Library/CrudPanel/Traits/Update.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public function update($id, $data)
2626
$data = $this->compactFakeFields($data);
2727
$item = $this->model->findOrFail($id);
2828

29+
$data = $this->changeBelongsToNamesFromRelationshipToForeignKey($data, $this->getFields());
30+
2931
$this->createRelations($item, $data);
3032

3133
// omit the n-n relationships when updating the eloquent item

0 commit comments

Comments
 (0)