mirror of
https://github.com/archtechx/laravel-seo.git
synced 2025-12-14 02:34:04 +00:00
Make flipp use raw values
This commit is contained in:
parent
9cebfec4c8
commit
ab1e01b066
3 changed files with 33 additions and 3 deletions
|
|
@ -109,6 +109,16 @@ class SEOManager
|
|||
));
|
||||
}
|
||||
|
||||
/** Get a value without modifications. */
|
||||
public function raw(string $key): string|null
|
||||
{
|
||||
return isset($this->values[$key])
|
||||
? value($this->values[$key])
|
||||
: value($this->defaults[$key] ?? (
|
||||
Str::contains($key, '.') ? $this->get(Str::after($key, '.')) : null
|
||||
));
|
||||
}
|
||||
|
||||
/** Configure an extension. */
|
||||
public function extension(string $name, bool $enabled = true, string $view = null): static
|
||||
{
|
||||
|
|
@ -144,8 +154,8 @@ class SEOManager
|
|||
|
||||
if ($data === null) {
|
||||
$data = [
|
||||
'title' => $this->title,
|
||||
'description' => $this->description,
|
||||
'title' => $this->raw('title'),
|
||||
'description' => $this->raw('description'),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue