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');