Laravel Query with Multiple Tables Join and Multiple Join Fields
Laravel Query with Multiple Tables Join and Multiple Join Fields I'm trying to build a query to join multiple tables with multiple join fields. This is the code: $crew = DB::table('crew') ->join('aclist', function ($join){ $join->on(function($query){ $query->on('aclist.ac_config', '=', 'crew.config') ->on('aclist.ac_type', '=', 'crew.ac_type'); }); }) // Error happened after I add this indexform join script ->join('indexform', function ($join){ $join->on(function($query){ $query->on('indexform.config', '=', 'crew.config') ->on('indexform.ac_type', '=', 'crew.ac_type'); }); }) ->select('crew.*','ind...