WIP on how to handle values

This commit is contained in:
Ryan Scherler
2020-12-21 15:03:20 -08:00
parent d64e70acef
commit 3436ef0eb4
+4 -2
View File
@@ -12,8 +12,10 @@ class Checkboxes extends BaseField {
*/
public function options(array $options): self
{
foreach ($options as $key => $value) {
$this->options[] = Checkbox::make($this->model.'.'.$key)->label($value);
foreach ($options as $value => $label) {
$this->options[] = Checkbox::make($this->model)
->label($label)
->value($value);
}
return $this;