diff --git a/src/FormBuilder.php b/src/FormBuilder.php index 2b69ac0..5ff6ea8 100644 --- a/src/FormBuilder.php +++ b/src/FormBuilder.php @@ -722,7 +722,7 @@ class FormBuilder { $selected = $this->getSelectedValue($value, $selected); - $options = ['value' => $value, 'selected' => $selected] + $attributes; + $options = array_merge(['value' => $value, 'selected' => $selected], $attributes); return $this->toHtmlString('html->attributes($options) . '>' . e($display) . ''); } diff --git a/src/HtmlBuilder.php b/src/HtmlBuilder.php index d2ba3cd..aeeb160 100755 --- a/src/HtmlBuilder.php +++ b/src/HtmlBuilder.php @@ -94,7 +94,7 @@ class HtmlBuilder { $defaults = ['media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet']; - $attributes = $attributes + $defaults; + $attributes = array_merge($attributes, $defaults); $attributes['href'] = $this->url->asset($url, $secure); @@ -132,7 +132,7 @@ class HtmlBuilder { $defaults = ['rel' => 'shortcut icon', 'type' => 'image/x-icon']; - $attributes = $attributes + $defaults; + $attributes = array_merge($attributes, $defaults); $attributes['href'] = $this->url->asset($url, $secure);