In case this might help someone! Bug with collections

I had an issue with divs disappearing, when I click on a button that triggers Livewire action. It turned out to be this, if I join many Eloquent models:

Message::select('messages.*')->join(......)->join(....)

And if I specify columns from another table in the select() I get bugs during rerender and and all my collection items disappear. So I need to use Eloquent relationships in my blade template to get what I need, for example $mssage->application->job->title … instead of selecting it directly as j.title in the select() method.

Hope this helps someone, weird bug, why does it happen?

If it’s blade, it’s PHP, not javascript so you need to access your properties through PHP accessors.