diff --git a/src/Items/BaseItem.php b/src/Items/BaseItem.php index de60d04..3ec2553 100644 --- a/src/Items/BaseItem.php +++ b/src/Items/BaseItem.php @@ -29,7 +29,7 @@ abstract class BaseItem implements Htmlable, Stringable public function setId(string $id): static { - $this->id = $id; + $this->attributes['id'] = $id; return $this; } @@ -86,7 +86,6 @@ public function setClass(string $class): static public function toHtml(): string { return view('laravel-form::' . $this->viewName, [ - 'id' => $this->id, 'name' => $this->name, 'class' => $this->class, 'type' => $this->type,