select
"workshop_instance_visit".*,
"workshop_session".*
from "workshop_instance_visit"
right join "workshop_session" as "ws" on "workshop_instance_visit"."workshop_session_id" = "ws"."workshop_session_id"
where "ws"."workshop_session_id" = 'b57649c6-81ea-4f4c-bfa4-f91e2aed9ff3'
select
"workshop_instance_visit".*,
"workshop_session".*
from "workshop_instance_visit"
right join "workshop_session" as "ws" on "workshop_instance_visit"."workshop_session_id" = "ws"."workshop_session_id"
where "workshop_instance_visit"."workshop_session_id" = 'b57649c6-81ea-4f4c-bfa4-f91e2aed9ff3'
Мой код.
$query->rightJoin('workshop_session AS ws', 'workshop_instance_visit.workshop_session_id', '=', 'ws.workshop_session_id')
Ваш код
$query->rightJoin('customer_workshop_instance AS cwi','cwi.workshop_instance_id', '=', 'ws.workshop_instance_id');
DB::enableQueryLog();
//ваши запросы
dd(DB::getQueryLog());
2 rightJoin пробовал. Тоже не помогло.
$query->rightJoin('workshop_session AS ws', 'workshop_instance_visit.workshop_session_id', '=', 'ws.workshop_session_id')
?