public static function mergeStatic($new = null, array $old = [])
    {
        // Parses the string into an associative array
        parse_str(preg_replace('/\s*([\w-]+)\s*=\s*"([^"]+)"/', '$1=$2&', $new), $attrs);

        // Merge classes
        $attrs['class'] = self::formatGroupClass($attrs, $old);

        // Merging new and old array and parse it as a string
        return self::attributes(array_merge(Arr::except($old, array('class')), $attrs));
    }
public static function mergeStatic($new = null, array $old = [])
    {
        // Parses the string into an associative array
        parse_str(preg_replace('/\s*([\w-]+)\s*=\s*"([^"]+)"/', '$1=$2&', $new), $attrs);

        // Merge classes
        $attrs['class'] = self::formatGroupClass($attrs, $old);

        // Merging new and old array and parse it as a string
        return self::attributes(array_merge(Arr::except($old, array('class')), $attrs));
    }
public static function mergeStatic ( $ new = null , array $ old = [ ] ) { // Parses the string into an associative array parse_str ( preg_replace ( '/\s*([\w-]+)\s*=\s*"([^"]+)"/' , '$1=$2&' , $ new ) , $ attrs ) ; // Merge classes $ attrs [ 'class' ] = self :: formatGroupClass ( $ attrs , $ old ) ; // Merging new and old array and parse it as a string return self :: attributes ( array_merge ( Arr :: except ( $ old , array ( 'class' ) ) , $ attrs ) ) ; }
Merge item's attributes with a static string of attributes.

@param null  $new
@param array $old

@return string
Merge item s attributes with a static string of attributes .