outl1ne / nova-settings

A Laravel Nova tool for editing custom settings using native Nova fields.
MIT License
273 stars 97 forks source link

No way to use with BooleanGroup #80

Closed vbezruchkin closed 2 years ago

vbezruchkin commented 2 years ago

Hello,

Thanks for your great package.

I'm trying to use the following code in the settings list:

            BooleanGroup::make('Shipping days', 'shipping_days')
                ->options([
                    'monday' => 'Monday',
                    'tuesday' => 'Tuesday',
                    'wednesday' => 'Wednesday',
                    'thursday' => 'Thursday',
                    'friday' => 'Friday',
                    'saturday' => 'Saturday',
                    'sunday' => 'Sunday',
                ]),

I also pass cast type like:

'shipping_days' => 'array',

I get the following error as a result.

BadMethodCallException
Method Illuminate\Support\Collection::isAssoc does not exist.

Any ideas please? I tried cast it like collection & json - nothing worked.

Thanks in advance.

KasparRosin commented 2 years ago

Hei, @vbezruchkin 👋🏻 !

Checkout issue #19, should help with the problem you are having.