I have two tables,one is called patient_payments and the other is patient_billing.i now want to select all the rows from each table and then present them as a single list in my webpage.I am using laravel framework and i have used raw query as follows
$items = DB::select(DB::raw('select * from patient_payments pp,patient_billings pb'));
If both tables have the same number of columns, you can use
union() method like this:
$items = DB::table('patient_payments') ->union(DB::table('patient_billings')) ->get();
Read more about Laravel Query Builder:
Hope this help.