In this tutorial, we will see laravel crossjoin query example. We will see crossjoin query in laravel.
Given below is the example for laravel crossjoin query
Example : 1
$employees = DB::table('employees')
->crossJoin('departments')
->get();
Example : 2
$employees = Employee::crossJoin('departments')->get();
I hope this example helps you.