I have a collection which I have extracted from the database using the findMany method in eloquent. When I dd the collection it looks like the attached image. And then I am trying to (in my blade) loop through each item in the array such that I am able to print each of the values in the actual records.
$question = Question::whereIn('id', [23,25])->get();
Then in my blade I am trying to do:
@foreach ($question as $row => $innerArray)
@foreach ($innerArray as $innerRow => $value)
{{$value->question}} //I was expecting "What is your favourite food" here
@foreach ($value->option as $choice)
<li>{{$choice}}</li> //I was expecting the list of the options here
@endforeach
@endforeach
@endforeach
What am I doing wrong?

{{$value->question}}be {{$value['question']}} since is an array and not an object property ? And same for@foreach ($value->option as $choice)with$value['options']with and 's'