嗨,如何在代码点火器 php 上添加可选参数以进行路由
$route['api/v1/(:any)'] = "$1/index";
$route['api/v1/(:any)/(:any)'] = "$1/index/$2";
网址例如:
app.domain.com/api/v1/users 调用$users->index()
app.domain.com/api/v1/users/1 调用$users->index(1)
我需要 tge 路线是动态的$route['api/v1/(:any)']