mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 00:32:21 +00:00
[FEATURE] Added support for patch.
- Put now also allow patch request types.
This commit is contained in:
@@ -57,7 +57,7 @@ class SimpleRouter {
|
||||
public static function put($url, $callback, array $settings = null) {
|
||||
$route = new RouterRoute($url, $callback);
|
||||
$route->addSettings($settings);
|
||||
$route->setRequestMethods(array(RouterRoute::REQUEST_TYPE_PUT));
|
||||
$route->setRequestMethods(array(RouterRoute::REQUEST_TYPE_PUT, RouterRoute::REQUEST_TYPE_PATCH));
|
||||
|
||||
$router = RouterBase::getInstance();
|
||||
$router->addRoute($route);
|
||||
|
||||
Reference in New Issue
Block a user