Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Nov 23, 2023
1 parent 7b319ca commit bac111f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Fields/MorphTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,9 @@ public function toArray(): array
*/
public function toInput(Request $request, Model $model): array
{
$relation = $this->getRelation($model);

return array_merge(parent::toInput($request, $model), [
'url' => $this->replaceRoutePlaceholders($request->route()),
'morphTypeName' => $name = $relation->getMorphType(),
'morphTypeName' => $name = $this->getRelation($model)->getMorphType(),
'morphType' => $model->getAttribute($name),
]);
}
Expand Down

0 comments on commit bac111f

Please sign in to comment.