File tree Expand file tree Collapse file tree 5 files changed +15
-6
lines changed
resources/views/components Expand file tree Collapse file tree 5 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace App \Support ;
4+
5+ class Version
6+ {
7+ public const LATEST = '4.x ' ;
8+ }
Original file line number Diff line number Diff 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 --}}
Original file line number Diff line number Diff 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" >
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 77use Illuminate \Http \RedirectResponse ;
88use Illuminate \Support \Facades \Route ;
99use Illuminate \Support \Str ;
10+ use App \Support \Version ;
1011
1112/*
1213|--------------------------------------------------------------------------
5455
5556Route::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
6162Route::prefix ('/docs ' )->group (function () {
6263 Route::get ('/{slug?} ' , function (string $ slug = null ): string | RedirectResponse {
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 " );
You can’t perform that action at this time.
0 commit comments