I have a questions table and a tags table. I want to fetch all questions from tags of a given question. So, for example, I may have the tags \"Travel,\" \"Trains\" and \"Cul
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.