Skip to content

Commit 82101c6

Browse files
Improve form
1 parent b719558 commit 82101c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Form.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Kris\LaravelFormBuilder;
44

55
use Illuminate\Contracts\Events\Dispatcher as EventDispatcher;
6+
use Illuminate\Contracts\Support\Arrayable;
67
use Illuminate\Contracts\Validation\Factory as ValidatorFactory;
78
use Illuminate\Contracts\Validation\Validator;
89
use Illuminate\Database\Eloquent\Model;
@@ -80,7 +81,7 @@ public function addBefore($name, $fieldName, $type = 'text', $options = [], $mod
8081
return $this;
8182
}
8283

83-
public function add(string $name, string $type = 'text', array $options = [], bool $modify = false): static
84+
public function add(string $name, string $type = 'text', array|Arrayable $options = [], bool $modify = false): static
8485
{
8586
$this->formHelper->checkFieldName($name, get_class($this));
8687

0 commit comments

Comments
 (0)