mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
添加快捷路由支持
This commit is contained in:
@@ -216,6 +216,15 @@ class Route
|
||||
}
|
||||
}
|
||||
|
||||
// 注册快捷路由
|
||||
public static function express($rule, $route = '', $option = [], $pattern = [])
|
||||
{
|
||||
$method = ['get', 'post', 'put', 'delete'];
|
||||
foreach ($method as $type) {
|
||||
self::$type($rule . '/:action', $route . '/' . $type . ':action', $option, $pattern);
|
||||
}
|
||||
}
|
||||
|
||||
// rest方法定义和修改
|
||||
public static function rest($name, $resource = [])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user