Skip to content

Commit 3f809fe

Browse files
committed
Ignoring id, computed fields and relationships
1 parent e43180a commit 3f809fe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/NovaInlineRelationship.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,10 @@ protected function getRelationshipRule($attribute, $properties): RelationshipRul
255255
*/
256256
protected function getPropertiesFromResource($model, $attribute): array
257257
{
258+
/** @var Resource $attribResource */
258259
$attribResource = ! empty($this->resourceClass) ? new $this->resourceClass($model) : Nova::newResourceFromModel($model->{$attribute}()->getRelated());
259260

260-
return collect($attribResource->fields(request()))->map(function ($value, $key) {
261+
return collect($attribResource->updateFields(new NovaRequest()))->map(function ($value, $key) {
261262
return ['component' => get_class($value), 'label' => $value->name, 'options' => $value->meta, 'rules' => $value->rules, 'attribute' => $value->attribute];
262263
})->keyBy('attribute')->toArray();
263264
}

0 commit comments

Comments
 (0)