From e4c01e6365c24bbb888f36456b7a36003d888c9e Mon Sep 17 00:00:00 2001 From: Saade Date: Thu, 12 Sep 2024 09:48:26 -0300 Subject: [PATCH] add api redirect to web.php file --- routes/web.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routes/web.php b/routes/web.php index 73ce5d010..2ec8622ba 100644 --- a/routes/web.php +++ b/routes/web.php @@ -54,6 +54,10 @@ Route::redirect('/discord', 'https://discord.gg/filament')->name('discord'); +Route::get('/api/{version?}', function (string $version = '3.x'): RedirectResponse { + return redirect('/api/' . $version . '/index.html'); +})->where('version', '/[1-3]+\.x/')->name('api-docs'); + Route::prefix('/docs')->group(function () { Route::redirect('/getting-started', '/docs/panels/getting-started'); Route::redirect('/resources', '/docs/panels/resources/getting-started');