mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
路由规则增加PATCH请求类型支持
This commit is contained in:
@@ -26,6 +26,7 @@ class Route
|
|||||||
'POST' => [],
|
'POST' => [],
|
||||||
'PUT' => [],
|
'PUT' => [],
|
||||||
'DELETE' => [],
|
'DELETE' => [],
|
||||||
|
'PATCH' => [],
|
||||||
'HEAD' => [],
|
'HEAD' => [],
|
||||||
'OPTIONS' => [],
|
'OPTIONS' => [],
|
||||||
'*' => [],
|
'*' => [],
|
||||||
@@ -414,6 +415,20 @@ class Route
|
|||||||
self::rule($rule, $route, 'DELETE', $option, $pattern);
|
self::rule($rule, $route, 'DELETE', $option, $pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册PATCH路由
|
||||||
|
* @access public
|
||||||
|
* @param string $rule 路由规则
|
||||||
|
* @param string $route 路由地址
|
||||||
|
* @param array $option 路由参数
|
||||||
|
* @param array $pattern 变量规则
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public static function patch($rule, $route = '', $option = [], $pattern = [])
|
||||||
|
{
|
||||||
|
self::rule($rule, $route, 'PATCH', $option, $pattern);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册资源路由
|
* 注册资源路由
|
||||||
* @access public
|
* @access public
|
||||||
|
|||||||
Reference in New Issue
Block a user