Skip to content

Commit

Permalink
Update RelationManager.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Jul 3, 2022
1 parent 83243e9 commit effebca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/RelationManagers/RelationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public static function getRecordTitleAttribute(): ?string

public static function getRecordTitle(?Model $record): ?string
{
return $record?->getAttributeValue(static::getRecordTitleAttribute()) ?? static::getModelLabel();
return $record?->getAttributeValue(static::getRecordTitleAttribute()) ?? $record?->getKey();
}

/**
Expand Down

0 comments on commit effebca

Please sign in to comment.