Is there is a reason you don't just execute the raw SQL?
You can run it through DB::unprepared()
here's a good example of a union sql that may help:
$table1 = DB::table('table1')->select('column1', 'column2', 'column3')->orderBy('created_at', 'desc');
$table2 = DB::table('table2')->select('column1', 'column2', 'column3')->orderBy('created_at', 'desc');
$combined = $table1->union($table2);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community