You’re working with an array. You will need [0] somewhere. Use dd() to see what is returned
Jul 5, 2020
9
Level 12
HELP, convert string to json... ?
HI, please I am trying to get out the information of this string
I save this string in a field of my data base
[{"layout":"information","key":"phjxcw98rGBxz9TC","attributes":{"tittle":"bienvenida","video":"23483"}},{"layout":"information","key":"2Wf2vWG0wMwdgkcy","attributes":{"tittle":"ingredientes","video":"1239891283"}},{"layout":"information","key":"w0BOvHFBrUvkSatU","attributes":{"tittle":"recomendaciones","video":"12391283"}}]
when I call this on a laravel view
{{ $seccion->information }}
got the information of the top, BUT HOW I CAN ENTER INTO attributes->tittle ???????????
Thanks in advance
Level 1
@santino like any php array In the view
@foreach($section->information as $info)
{{$info['key'] }}
@endforeah
1 like
Please or to participate in this conversation.