1
2// get all film projects
3$filmProjects= FilmProject::all();
4
5// get all new media projects
6$newMediaProjects= NewMediaProject::all();
7
8// merge projects,
9foreach($filmProjects as $filmProject) {
10 $newMediaProjects->add($filmProject);
11}
12
13// or we can also do this $newMediaProjects->toBase()->merge($filmProjects);
14
15dd($newMediaProjects->toArray());