laravel一种非规范的伪静态方法

2023-08-15 21:53:59
721

这个方法比较简单粗暴,直接在后面加.html,在controller接收参数时用string $id方法。

Route::get('/post/{id}.html', [PostController::class, 'get']);