To perform a “cross join” use the crossJoin method with the name of the table you wish to cross join to. Cross joins generate a Cartesian product between the first table and the joined table.
Let’s create a crossJoin method in laravel 5
$salehistory = DB::table('sale_history')
->crossJoin('sale_detail')
->get();