SyntaxFix
Write A Post
Hire A Developer
Questions
Creating a new base collection for each eloquent collection the merge works for me.
$foo = collect(Foo::all()); $bar = collect(Bar::all()); $merged = $foo->merge($bar);
In this case don't have conflits by its primary keys.