Added PATCH route method.

This commit is contained in:
Jepp9350
2024-12-17 12:01:01 +01:00
parent 9d74736b31
commit 94e833da68
+9
View File
@@ -69,6 +69,15 @@ trait route_t
$this->registerRoute($route, 'OPTIONS', $callback);
}
/**
* PATCH route
* @param string $route Example: /home, /home/{id}
*/
public function patch(string $route, callable $callback): void
{
$this->registerRoute($route, 'PATCH', $callback);
}
/**
* Match route
* @param string $route Example: /home, /home/{id}