We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a630d58 commit 4ca16b2Copy full SHA for 4ca16b2
src/Html/Attributes.php
@@ -84,14 +84,10 @@ public function isEmpty(): bool
84
85
public function toArray(): array
86
{
87
- if (empty($this->classes) || empty($this->id)) {
88
- return $this->attributes;
89
- }
90
-
91
- return array_merge($this->attributes, [
+ return array_merge($this->attributes, array_filter([
92
'class' => implode(' ', $this->classes),
93
- 'id' => implode(' ', $this->id),
94
- ]);
+ 'id' => $this->id,
+ ]));
95
}
96
97
public function toString(): string
0 commit comments