We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4010420 commit 23e3ba6Copy full SHA for 23e3ba6
src/SeoManager.php
@@ -286,7 +286,10 @@ public function setAlternates(?array $value): static
286
if ($this->opengraph) {
287
$this->opengraph->locale = new Locale(
288
locale: $this->opengraph->locale?->locale ?? App::getLocale(),
289
- alternate: array_map(fn ($item) => $item->toOpenGraph(), $value ?? [])
+ alternate: collect($value)
290
+ ->where('hreflang', '!=', 'x-default')
291
+ ->map(fn ($item) => $item->toOpenGraph())
292
+ ->toArray()
293
);
294
}
295
0 commit comments