fix(layout): fix canonical link generation based on request URI

Adjusts the canonical link generation in the layout file to use `url()->full()` when 'page' is in the request URI.
This commit is contained in:
Rico van Zelst
2024-03-03 18:06:13 +01:00
parent efe37557f3
commit 5c0a03e753

View File

@@ -23,7 +23,11 @@
<title>@yield('title')</title>
<meta name="description" content="@yield('description')">
@if (strpos($_SERVER['REQUEST_URI'], 'page') !== false)
<link rel="canonical" href="{{ url()->full() }}">
@else
<link rel="canonical" href="{{ url()->current() }}">
@endif
@stack('meta_tags')