mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
路由检测增加行为支持
This commit is contained in:
@@ -261,10 +261,13 @@ class Route
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 自定义检测
|
// 自定义检测
|
||||||
if (!empty($option['callback']) && is_callable($option['callback'])) {
|
if (!empty($option['callback']) && is_callable($option['callback']) && false === call_user_func($option['callback'])) {
|
||||||
if (false === call_user_func($option['callback'])) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 行为检测
|
||||||
|
if (!empty($option['behavior']) && false === \think\hook::exec($option['behavior'])) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($val['routes'])) {
|
if (!empty($val['routes'])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user