自动检测嵌套控制器的最简单方法是什么?像:
Route::controller('forms.*');
这很有效,但有点笨拙:
Route::any('forms/(:any)/(:any)', function($entity_type, $id){
return Controller::call('forms.' . $entity_type . '@index', array($id));
});
此外,正确的嵌套控制器路由不接受反斜杠参数。这是一个错误或功能吗?
Route::controller('forms.user');
dan.com/forms/user/31 = 401