diff --git a/Routes.php b/Routes.php index 4999981..62cc791 100644 --- a/Routes.php +++ b/Routes.php @@ -32,7 +32,7 @@ public function __construct() { * @return Routes returns the instance of the Routes utility * @throws Exception Throws an exception when you try to declare and already existing route */ - public function add(string $url = "", callable $callback = NULL, array $method = ["GET"]): self { + public function add(string $url = "", callable|string|null $callback = NULL, array $method = ["GET"]): self { $tmpUrl = $url; foreach ($method as $m) { diff --git a/composer.json b/composer.json index 10be8d8..9753fe6 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=7.4", + "php": ">=8.0", "ext-json": "*" }, "autoload": {