Hey, my book is finally available. Find it here.  Eloquent Beyond The Basics!

🔥 Laravel Tip: Merging eloquent collections

Sep 9, 2022

The Eloquent collection's merge method uses the id to avoid duplicated models.

But if you are merging collections of different Models, it can cause get you unexpected results.

Use the base collection method instead.
tip-image-0