这个方法比较简单粗暴,直接在后面加.html,在controller接收参数时用string $id方法。
Route::get('/post/{id}.html', [PostController::class, 'get']);