Sunday, May 21, 2017

merge models octoberCMS, including attached files

How can I merge two models including attached files?

$hotels = collect([Hotel::get()]);
$tours = collect([Tours::get()]);
$merged = $hotels->merge($tours);

this works and merges collections, but it's doesnt include attacheOne/attachMany How can I do this? Thanks



via aleXela

Advertisement