webman 用input获取路由过后的参数,获取不到

a178251115

路由配置:
Route::any('/detail/{id:\d+}.html', [app\index\controller\Vod::class, 'detail']);

然后访问xxxx.com/detail/123.html
通过input() 来获取输入的 ,打印出来是空的,想获取id这个参数应该怎么做?

553 1 0
1个回答

Madman
public function detail(Request $request, $id): Response
{
return response($id);
}
×
🔝