@foreach($contents as $content)
@livewire('front-end.social.timeline', ['content' => $content], key($loop->index))
@endforeach
Could someone please tell me why this is giving me an error? This is how the manual indicates that we have to pass the variables to a child component.
the $contents collection is defined because if I do this, it works:
@foreach($contents as $content)
{{$content}}
@endforeach
The error only comes when passing it to the livewire component.