name]) { $data['order_attributes'][] = $case->value ?? null; } } return $data; } protected function mutateFormDataBeforeSave(array $data): array { foreach (OrderAttributes::cases() as $case) { $data[$case->name] = false; } $data['order_attributes'] = array_filter($data['order_attributes']); foreach ($data['order_attributes'] as $attribute) { $data[OrderAttributes::from($attribute)->name] = true; } unset($data['order_attributes']); return $data; } protected function getHeaderActions(): array { return [ Actions\DeleteAction::make(), ]; } }