How do I perform a full join given two tables t1 and t2 in laravel eloquent?
See Question&Answers more detail:osHow do I perform a full join given two tables t1 and t2 in laravel eloquent?
See Question&Answers more detail:osIf you were using MySQL.
MySQL has no inbuilt support for full outer join.
But you can use the code like this below to achieve that.
$table2 = DB::table('t2')
->rightJoin('t1', 't1.id', '=', 't2.t1_id')
$table1 = DB::table('t1')
->leftJoin('t2', 't1.id', '=', 't2.t1_id')
->unionAll($table1)
->get();