public static function mergeGroup($new, $old)
{
$new['namespace'] = static::formatUsesPrefix($new, $old);
$new['prefix'] = static::formatGroupPrefix($new, $old);
if (isset($new['domain'])) {
unset($old['domain']);
}
$new['where'] = array_merge(isset($old['where']) ? $old['where'] : [], isset($new['where']) ? $new['where'] : []);
if (isset($old['as'])) {
$new['as'] = $old['as'] . (isset($new['as']) ? $new['as'] : '');
}
return array_merge_recursive(Arr::except($old, ['namespace', 'prefix', 'where', 'as']), $new);
}