Luracast Restler-在一个路由规则中路由一个对象/对象列表


Luracast Restler - routing one object/list of object in one routing rule

我不知道如何配置路由类以在一个索引方法中路由:

类别/176
类别/?深度=3&类别=4

第一个URL用于一个类别,第二个URL用于类别列表(按深度和类别参数过滤)。

我有这个方法的类别:

/**
* @smart-auto-routing false
*/
public function index($category_id) {
}

好的,这适用于类别/176,但我如何添加类别/?深度=3&category=4路由到此索引方法?

Class Categories
{
    public function index($depth=3, $category=4) {
        //categories?depth=3&category=4 received here
        //since they have default values we can call
        //categories with out any query param too!
    }
    public function get($id){
        //categories/176 received here
    }
}