Crud: [Bug] Checklist not checked old data

Created on 2 Sep 2020  路  3Comments  路  Source: Laravel-Backpack/CRUD

Checklist not checked old data

image

image

triage

Most helpful comment

Hello @abewartech

Testing this I figured out that you need to add engine to your model $casts.

protected $casts = ['engine' => 'array'];

I checked and it's missing in the docs. I am submitting an PR to the docs so we can clarify people that when using pivot => false or just don't setup pivot at all, will default to false, you need to cast the db column to array in your model.

Sorry for missing info on docs.

I am going to close this, if I am wrong, please re-open.

Best,
Pedro

All 3 comments

@abewartech thanks for the report.

Could you provide me your checklist field definition ? Thanks

image

Thanks

Hello @abewartech

Testing this I figured out that you need to add engine to your model $casts.

protected $casts = ['engine' => 'array'];

I checked and it's missing in the docs. I am submitting an PR to the docs so we can clarify people that when using pivot => false or just don't setup pivot at all, will default to false, you need to cast the db column to array in your model.

Sorry for missing info on docs.

I am going to close this, if I am wrong, please re-open.

Best,
Pedro

Was this page helpful?
0 / 5 - 0 ratings