Skip to content

Commit

Permalink
Check just the value string.
Browse files Browse the repository at this point in the history
  • Loading branch information
v16Studios committed Mar 6, 2024
1 parent 3d9892c commit 6d2288b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Laravel/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected function metadata(): Attribute
$collectionUriAttribute = $this->collection->load('attributes')->getRelation('attributes')
->filter(fn ($attribute) => 'uri' == $attribute->key)
->first();
if ($collectionUriAttribute && Str::contains($collectionUriAttribute, '{id}')) {
if ($collectionUriAttribute && Str::contains($collectionUriAttribute->value, '{id}')) {
$collectionUriAttribute->value = Str::replace('{id}', "{$this->collection->collection_chain_id}-{$this->token_chain_id}", $collectionUriAttribute->value);
}

Expand Down

0 comments on commit 6d2288b

Please sign in to comment.