laravel / nova-issues

554 stars 34 forks source link

KeyValue field error #2474

Closed xerox-xeon closed 4 years ago

xerox-xeon commented 4 years ago

Description:

insert options field value {"dubbo": "1.3.5"} image

result: image

Steps To Reproduce:

KeyValue::make('Options')->rules('json'),
jbrooksuk commented 4 years ago

Your options field needs to be cast to an array within your Model.

xerox-xeon commented 4 years ago

NICE

    protected $casts = [
        'options' => 'collection',
    ];
davidhemphill commented 4 years ago

lol