mirror of
https://github.com/archtechx/laravel-seo.git
synced 2025-12-12 01:44:03 +00:00
Support keys for rawTag()
This commit is contained in:
parent
0ebc50cad9
commit
5729da6e6d
3 changed files with 14 additions and 4 deletions
|
|
@ -191,9 +191,11 @@ class SEOManager
|
|||
}
|
||||
|
||||
/** Add a head tag. */
|
||||
public function rawTag(string $tag): static
|
||||
public function rawTag(string $key, string $tag = null): static
|
||||
{
|
||||
$this->tags[] = $tag;
|
||||
$tag ??= $key;
|
||||
|
||||
$this->tags[$tag] = $tag;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
@ -201,7 +203,7 @@ class SEOManager
|
|||
/** Add a meta tag. */
|
||||
public function tag(string $property, string $content): static
|
||||
{
|
||||
$this->rawTag("<meta property=\"{$property}\" content=\"{$content}\" />");
|
||||
$this->rawTag("meta.{$property}", "<meta property=\"{$property}\" content=\"{$content}\" />");
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue