Looping through collection returns single output

What seems to be the problem:

Steps to Reproduce: on wire:init=“updatestatus” I want to update the status of events in the database by looking at the time event is to end. So on fetching all events, it retrieved all events but on foreach loop,it return a single event. What am I doing wrong.

Are you using the latest version of Livewire:

Do you have any screenshots or code examples:

If you make dd inside the loop it will stop in first iteration…like you tell it to do it.

Thanks…I realised. Anyway the problem was that I was overthinking when using livewire.

The solution was just a normal model update to database after comparing date.

That worked for me.anyway I am new to laravel and livewire and am enjoying it.

1 Like

Good codding and any help you need come here and share your doubts and issues. Greetings