mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
修正Route类的rescource方法
This commit is contained in:
@@ -401,8 +401,8 @@ class Route
|
|||||||
if (strpos($val[1], ':id') && isset($option['var'][$rule])) {
|
if (strpos($val[1], ':id') && isset($option['var'][$rule])) {
|
||||||
$val[1] = str_replace(':id', ':' . $option['var'][$rule], $val[1]);
|
$val[1] = str_replace(':id', ':' . $option['var'][$rule], $val[1]);
|
||||||
}
|
}
|
||||||
$rule = ltrim($rule . $val[1], '/');
|
$item = ltrim($rule . $val[1], '/');
|
||||||
self::rule($rule ? $rule . '$' : '', $route . '/' . $val[2], $val[0], $option, $pattern);
|
self::rule($item ? $item . '$' : '', $route . '/' . $val[2], $val[0], $option, $pattern);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user