Permet de supprimer une news
This commit is contained in:
@@ -46,6 +46,11 @@ class Router
|
||||
return $this->addRoute(['GET', 'POST'], $path, $callable);
|
||||
}
|
||||
|
||||
public function delete(string $path, callable $callable): self
|
||||
{
|
||||
return $this->addRoute(['DELETE'], $path, $callable);
|
||||
}
|
||||
|
||||
private function addRoute(array $methods, string $path, $callable): self
|
||||
{
|
||||
$route = new Route($path, $callable);
|
||||
|
Reference in New Issue
Block a user