Permet de supprimer une news
This commit is contained in:
1 parent
2ab457aa8f
commit
ca78aca8cb
5 files changed
+28
-1
No files matched your search
@@ -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