Allow optional groups again
This commit is contained in:
parent
d0a026f5d9
commit
e170b07ca5
@ -103,8 +103,11 @@ abstract class Route
|
||||
);
|
||||
}
|
||||
|
||||
static function group(string $prefix = '', callable $callback)
|
||||
static function group(string $prefix = '', ?callable $callback = null)
|
||||
{
|
||||
if ($callback === null) {
|
||||
throw new InvalidArgumentException('Argument $callback must be of type callable.');
|
||||
}
|
||||
if (!str_starts_with(
|
||||
self::getRequestPath(),
|
||||
self::$prefix . $prefix
|
||||
|
Loading…
x
Reference in New Issue
Block a user