public static function merge($new, $old)
    {
        if (isset($new['domain'])) {
            unset($old['domain']);
        }

        $new = array_merge(static::formatAs($new, $old), [
            'namespace' => static::formatNamespace($new, $old),
            'prefix' => static::formatPrefix($new, $old),
            'where' => static::formatWhere($new, $old),
        ]);

        return array_merge_recursive(Arr::except(
            $old, ['namespace', 'prefix', 'where', 'as']
        ), $new);
    }
public static function merge($new, $old)
    {
        if (isset($new['domain'])) {
            unset($old['domain']);
        }

        $new = array_merge(static::formatAs($new, $old), [
            'namespace' => static::formatNamespace($new, $old),
            'prefix' => static::formatPrefix($new, $old),
            'where' => static::formatWhere($new, $old),
        ]);

        return array_merge_recursive(Arr::except(
            $old, ['namespace', 'prefix', 'where', 'as']
        ), $new);
    }
public static function merge ( $ new , $ old ) { if ( isset ( $ new [ 'domain' ] ) ) { unset ( $ old [ 'domain' ] ) ; } $ new = array_merge ( static :: formatAs ( $ new , $ old ) , [ 'namespace' => static :: formatNamespace ( $ new , $ old ) , 'prefix' => static :: formatPrefix ( $ new , $ old ) , 'where' => static :: formatWhere ( $ new , $ old ) , ] ) ; return array_merge_recursive ( Arr :: except ( $ old , [ 'namespace' , 'prefix' , 'where' , 'as' ] ) , $ new ) ; }
Merge route groups into a new array.

@param  array  $new
@param  array  $old
@return array
Merge route groups into a new array .