Skip to content

Commit c72084b

Browse files
committed
Allow array parameter on editors option for api consistency.
1 parent 370287f commit c72084b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Html/HasEditor.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ trait HasEditor
1616
/**
1717
* Attach multiple editors to builder.
1818
*
19-
* @param mixed ...$editors
19+
* @param array|mixed ...$editors
2020
* @return $this
2121
* @see https://editor.datatables.net/
2222
* @throws \Exception
2323
*/
2424
public function editors(...$editors)
2525
{
26+
if (is_array($editors[0])) {
27+
$editors = $editors[0];
28+
}
29+
2630
foreach ($editors as $editor) {
2731
$this->editor($editor);
2832
}

0 commit comments

Comments
 (0)