| @@ 519-528 (lines=10) @@ | ||
| 516 | * |
|
| 517 | * @return $this |
|
| 518 | */ |
|
| 519 | public function checked($checked = []) |
|
| 520 | { |
|
| 521 | if ($checked instanceof Arrayable) { |
|
| 522 | $checked = $checked->toArray(); |
|
| 523 | } |
|
| 524 | ||
| 525 | $this->checked = array_merge($this->checked, $checked); |
|
| 526 | ||
| 527 | return $this; |
|
| 528 | } |
|
| 529 | ||
| 530 | /** |
|
| 531 | * Add `required` attribute to current field if has required rule, |
|
| @@ 83-92 (lines=10) @@ | ||
| 80 | * |
|
| 81 | * @return $this |
|
| 82 | */ |
|
| 83 | public function checked($checked = []) |
|
| 84 | { |
|
| 85 | if ($checked instanceof Arrayable) { |
|
| 86 | $checked = $checked->toArray(); |
|
| 87 | } |
|
| 88 | ||
| 89 | $this->checked = (array) $checked; |
|
| 90 | ||
| 91 | return $this; |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * Draw inline checkboxes. |
|