protected function middlewareCollection(string $id = Group::DEFAULT_ID, $middleware = []): MiddlewareCollection
    {
        if (function_exists('collect_middleware')) {
            return collect_middleware($middleware, $id);
        } else {
            return new Group($middleware, $id);
        }
    }