🔥 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.
But if you are merging collections of different Models, it can cause get you unexpected results.
Use the base collection method instead.