Skip to content

Commit

Permalink
Merge pull request #1358 from Ichinya/2.x
Browse files Browse the repository at this point in the history
feat: Improved value resolution and preview generation for morph-to
  • Loading branch information
lee-to authored Dec 5, 2024
2 parents 977c7e8 + 598c8ea commit e833c95
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Fields/Relationships/MorphTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ protected function resolvePreview(): string
return str($this->types[$item->{$this->getMorphType()}] ?? $item->{$this->getMorphType()})
->append('(')
->append(
$item
->{$this->getRelationName()}
->{$this->getSearchColumn($item->{$this->getRelationName()}::class)}
data_get($item->{$this->getRelationName()}, $this->getSearchColumn($item->{$this->getRelationName()}::class))
)
->append(')')
->value();
Expand Down

0 comments on commit e833c95

Please sign in to comment.