This fixes an issue with serializing collections with multiple different models.
This issue occurs when queueing an eloquent collection
( and in some less important cases like livewire abusing the serialization logic during mounting of a component. )
This fix can be merged once the next framework version goes live. Currently the fix in the laravel framework is on 9.x (upcoming 9.32.0) https://github.com/laravel/framework/pull/44272
This fixes an issue with serializing collections with multiple different models. This issue occurs when queueing an eloquent collection ( and in some less important cases like livewire abusing the serialization logic during mounting of a component. )