Skip to content

Commit

Permalink
add api redirect to web.php file
Browse files Browse the repository at this point in the history
  • Loading branch information
saade committed Sep 12, 2024
1 parent dd68993 commit e4c01e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit e4c01e6

Please sign in to comment.