🔥 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.
Other tips:
🔥 Laravel Tip: Eloquent Subquery ordering
Mar 23, 2022
🔥 Laravel Tip: Dispatch jobs conditionally.
Apr 11, 2022
🔥 Laravel Tip: make method constructor parameters
Apr 16, 2022