there are three tables of A _
$a=DB::table("A")->where("some condition");
$b=DB::table("B")->where("some condition");
$c=DB::table("C")->where("some condition")->union($a)->union($b);
if the result set of $an or $b is empty, an error will be reported.
the solution now is to judge $a-> get () and $b-> get (), respectively, and union them if they are not empty, but there are actually a large number of tables, and each judgment is too inelegant.
so is there any elegant solution?