| @@ 495-504 (lines=10) @@ | ||
| 492 | * |
|
| 493 | * @return $this |
|
| 494 | */ |
|
| 495 | public function checked($checked = []) |
|
| 496 | { |
|
| 497 | if ($checked instanceof Arrayable) { |
|
| 498 | $checked = $checked->toArray(); |
|
| 499 | } |
|
| 500 | ||
| 501 | $this->checked = array_merge($this->checked, $checked); |
|
| 502 | ||
| 503 | return $this; |
|
| 504 | } |
|
| 505 | ||
| 506 | /** |
|
| 507 | * Add `required` attribute to current field if has required rule, |
|
| @@ 60-69 (lines=10) @@ | ||
| 57 | * |
|
| 58 | * @return $this |
|
| 59 | */ |
|
| 60 | public function checked($checked = []) |
|
| 61 | { |
|
| 62 | if ($checked instanceof Arrayable) { |
|
| 63 | $checked = $checked->toArray(); |
|
| 64 | } |
|
| 65 | ||
| 66 | $this->checked = (array)$checked; |
|
| 67 | ||
| 68 | return $this; |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * Draw inline checkboxes. |
|