mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 01:58:00 +08:00
WIP on how to handle values
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user