Skip to content

Commit 93c169b

Browse files
committed
remove uneeded parameter
1 parent a73ca67 commit 93c169b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ public function create($data)
2525
{
2626
$data = $this->decodeJsonCastedAttributes($data);
2727
$data = $this->compactFakeFields($data);
28+
$data = $this->changeBelongsToNamesFromRelationshipToForeignKey($data);
2829

2930
// omit the n-n relationships when updating the eloquent item
3031
$nn_relationships = Arr::pluck($this->getRelationFieldsWithPivot(), 'name');
3132

32-
$data = $this->changeBelongsToNamesFromRelationshipToForeignKey($data, $this->getFields());
33-
3433
$item = $this->model->create(Arr::except($data, $nn_relationships));
3534

3635
// if there are any relationships available, also sync those

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function update($id, $data)
2626
$data = $this->compactFakeFields($data);
2727
$item = $this->model->findOrFail($id);
2828

29-
$data = $this->changeBelongsToNamesFromRelationshipToForeignKey($data, $this->getFields());
29+
$data = $this->changeBelongsToNamesFromRelationshipToForeignKey($data);
3030

3131
$this->createRelations($item, $data);
3232

0 commit comments

Comments
 (0)