Reka
Reka
FFilament
Created by Reka on 3/27/2025 in #❓┊help
togglebutton group information
hello team, I read the docs, but I still not have the right behaviour I want with filament I created a filament page, with a form filled, and I want to group my items by sort of information In other words, I have an array which contains another array in it, and I would like to split my array into 2 defined groups
return $form
->schema([
ToggleButtons::make('Orientations') // https://www.laravel-filament.cn/docs/en/3.x/forms/fields/toggle-buttons
->options($orientations)
->inline()
->label('Orientations')
->live()
])
->statePath('data');
}
return $form
->schema([
ToggleButtons::make('Orientations') // https://www.laravel-filament.cn/docs/en/3.x/forms/fields/toggle-buttons
->options($orientations)
->inline()
->label('Orientations')
->live()
])
->statePath('data');
}
It works well if my $orientations array is flat : [1 => 'first', 2=>'second', 3=>'third']; but I would like to split my array [1 => ['A', 'B', 'C'], 2 => ['Z', 'Y', 'X']] Do you have any idea to do this easily ? Thank you for your help 🙂
6 replies