我需要能够路由在查询字符串中传递信息的请求。例如,假设我的应用程序调用 /api/company/delete?id=17。如何在 DooPHP 中路由它?我已经定义了一个包罗万象的路由,它正在抓取这个请求,但我需要能够在没有包罗万象的路由的情况下处理这些。
# this doesn't work
$route['get']['/api/company/delete?id=:id'] = array('AdminController', 'deletecompany');
# at the bottom of my routes I have this catchall route, which works but it catches --everything--
$route['*']['catchall']['/:id'] = array('HomeController', 'getregions');
我错过了一些明显的东西吗?