santino
3 months ago

Help, with protected casts in laravel model

Posted 3 months ago by santino
Protected $casts=[
		'information' =>'array'
	] ;

got this, I need to save the information as a text and then load it as an array, but how can I do it? am asking because I use this plugin with laravel novel

https://whitecube.github.io/nova-flexible-content/#/

this save the model as a text, but is a confusing json array don't have any idea how to decode...

this is the example on the format it save as a string

[{"layout":"information","key":"j8rMdCccjHHJI5ih","attributes":{"tittle":"asdfasfd","video":"234234"}},{"layout":"information","key":"X3ClC6W357d44kIC","attributes":{"tittle":"otro video","video":"aqui"}},{"layout":"information","key":"soBDv8tgqLuufYWR","attributes":{"tittle":"aewer","video":"wer"}}]

Please sign in or create an account to participate in this conversation.