How to preselect a CheckboxList

Hey, how is it possible to preselect some values on a CheckboxList I already tried the ->default([{"10":"Test"}]) but this does not work.

This is the complete code

Section::make('Attribute')
    ->schema(
        self::getAttributeData(Resort::class)
            ->map(fn($attributes, $group) =>
            CheckboxList::make($group)
                ->statePath('attributes')
                ->options(fn () => $attributes)
                ->default(fn (Resort $record) => $record->attributes()->pluck('name', 'id'))
            )->toArray()
    )
    ->columns(3)
Was this page helpful?