how to merge 2 laravel eloquent records

Solutions on MaxInterview for how to merge 2 laravel eloquent records by the best coders in the world

showing results for - "how to merge 2 laravel eloquent records"
Alicia
22 Nov 2019
1$original = new Collection(['foo']);
2
3$latest = new Collection(['bar']);
4
5$merged = $original->merge($latest); // Contains foo and bar.
6