private function resolveGroupCollections(array $groups = [])
    {
        foreach ($groups as $index => $group) {
            // register group
            RouteCollector::$firing['group'] = $group;

            app()->call($group['callback'], [app('route')]);

            // unregister the route
            unset(RouteCollector::$firing['group']);
            RouteCollector::removeGroup($index);
        }

        return RouteCollector::getRoutes();
    }