diff --git a/traits/route_t.php b/traits/route_t.php index 9f02660d..08334731 100644 --- a/traits/route_t.php +++ b/traits/route_t.php @@ -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}