Skip to content

Commit

Permalink
fix: variable request attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
paulineohlivd committed Sep 5, 2023
1 parent 83b8410 commit 8c0441b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fields/HandlesCustomPropertiesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ private function fillMediaCustomPropertiesFromRequest(NovaRequest $request, Medi
// If we are dealing with nested resources or multiple panels, custom property fields are prefixed.
$key = str_replace($collection, '__media-custom-properties__.'.$collection, $requestAttribute);
$targetAttribute = "custom_properties->{$field->attribute}";
$requestAttribute = "{$key}.{$index}.{$field->attribute}";
$newRequestAttribute = "{$key}.{$index}.{$field->attribute}";

$field->fillInto($request, $media, $targetAttribute, $requestAttribute);
$field->fillInto($request, $media, $targetAttribute, $newRequestAttribute);
}

$media->save();
Expand Down

0 comments on commit 8c0441b

Please sign in to comment.