当前位置: 代码迷 >> 综合 >> php中路由完整匹配
  详细解决方案

php中路由完整匹配

热度:29   发布时间:2023-10-16 14:38:00.0

在route.php中,自定义的路由信息如下

Route::get('api/:version/theme','api/:version.Theme/getSimpleList');
Route::get('api/:version/theme/:id','api/:version/theme/getComplexOne');

但是不能完全匹配。

解决方法:ctrl+shift+n,打开config.php文件,

ctrl+f 找到字段route_complete_match ,修改为true 即可

'route_complete_match'   => true,


  相关解决方案