Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Nov 28, 2023
1 parent b355b90 commit a907307
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Fields/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ public function asTextarea(Closure $callback = null): static
}

/**
* {@inheritdoc}
* Set the meta field as URL.
*/
public function async(bool $value = true): static
public function asUrl(Closure $callback = null): static
{
return $this;
return $this->as(URL::class, $callback);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/URL.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function resolveFormat(Request $request, Model $model): mixed
}

return sprintf(
'<a href="%s"%s>%s</a>',
'<a href="%1$s" title="%1$s"%2$s>%3$s</a>',
$value,
$this->isExternal($value) ? ' data-turbo="false" target="_blank"' : '',
call_user_func_array($this->textResolver, [$model])
Expand Down

0 comments on commit a907307

Please sign in to comment.