SELECT *
FROM table1 AS t1
LEFT JOIN table2 as t2
ON t1.a = t2.b
LEFT JOIN table3 AS t2
ON t1.a = t3.b
AND t2.a = t3.c
WHERE t1.d = 7
orOn
или where
:DB::table('users')
->join('contacts', function ($join) {
$join->on('users.id', '=', 'contacts.user_id')->orOn(...);
})
->get()
->and(...)
->andOn(...)
Пробовал - не работает :)