Skip to content

Commit 3632b4a

Browse files
fix few broken links
1 parent 65db6b8 commit 3632b4a

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

app/Support/Version.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace App\Support;
4+
5+
class Version
6+
{
7+
public const LATEST = '4.x';
8+
}

resources/views/components/plugins/hero.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class="absolute inset-0 -z-10 h-full w-full rounded-full bg-[#8e7edd] transition
235235
</a>
236236
<a
237237
x-ref="how_to_make_plugins"
238-
href="/docs/support/plugins/getting-started"
238+
href="/docs/plugins/getting-started"
239239
class="group/button relative block"
240240
>
241241
{{-- Button --}}

resources/views/components/sunset.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ class="mx-auto max-w-md px-4 pt-2 text-dolphin"
384384
class="px-4 pt-10"
385385
>
386386
<a
387-
href="{{ route('docs', ['slug' => 'panels/getting-started']) }}"
387+
href="{{ route('docs', ['slug' => 'introduction/overview']) }}"
388388
class="group/getstarted relative flex w-full items-center justify-between gap-5 overflow-hidden rounded-2xl px-10 py-8 ring-2 ring-transparent transition duration-300 hover:ring-peach-orange/40 motion-reduce:transition-none sm:py-10"
389389
>
390390
<div class="text-2xl font-bold sm:text-3xl">

resources/views/components/use-cases/admin-panel/introduction.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class="pt-5 text-xl text-dolphin"
5858
{{-- Link --}}
5959
<div class="grid place-items-center pt-10">
6060
<a
61-
href="{{ route('docs', ['slug' => 'panels/getting-started']) }}"
61+
href="{{ route('docs', ['slug' => 'introduction/overview']) }}"
6262
class="rounded-full bg-[#ffbc74] px-7 py-3 text-white transition duration-300 hover:bg-[#ffbc74]/80"
6363
>
6464
Get Started

routes/web.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Illuminate\Http\RedirectResponse;
88
use Illuminate\Support\Facades\Route;
99
use Illuminate\Support\Str;
10+
use App\Support\Version;
1011

1112
/*
1213
|--------------------------------------------------------------------------
@@ -54,9 +55,9 @@
5455

5556
Route::redirect('/discord', 'https://discord.gg/filament')->name('discord');
5657

57-
Route::get('/api/{version?}', function (string $version = '4.x'): RedirectResponse {
58+
Route::get('/api/{version?}', function (string $version = Version::LATEST): RedirectResponse {
5859
return redirect('/api/' . $version . '/index.html');
59-
})->where('version', '[1-4]+\.x')->name('api-docs');
60+
})->where('version', '[1-'.Str::before(Version::LATEST, '.x').']+\.x')->name('api-docs');
6061

6162
Route::prefix('/docs')->group(function () {
6263
Route::get('/{slug?}', function (string $slug = null): string | RedirectResponse {
@@ -74,7 +75,7 @@
7475
$slug = trim($slug, '/');
7576

7677
if (filled($slug) && (! str_contains($slug, '.x'))) {
77-
return redirect()->route('docs', ['slug' => "4.x/{$slug}"]);
78+
return redirect()->route('docs', ['slug' => Version::LATEST."/{$slug}"]);
7879
}
7980

8081
$filePath = base_path("docs/preserved-dist/{$slug}/index.html");

0 commit comments

Comments
 (0)