@stefancoding No, of course it doesn’t – that was just me being stupid. I’m used to dealing with collections of objects, and my brain frazzled. What I should have written was:
@Rumnaz khan That’s exactly the same as I wrote (->image does the same as ->get('image') in the CartItemOptions class), which didn’t work, for some reason.
Is working now.. The problem was that I looped twice. I looped over the Cart then I tried to loop overt the Options array.
@foreach($carts as $product)
@foreach($product->options as $option)
$option // this showing me only the image from options but not showing other options
$option['image'] // this not working
@endforeach
@endforeach
So I did with only one for each and its works now
@foreach($carts as $product)
$product->options['image']
$product->options['mainId']
$product->options['size']
@endforeach