Laravel / Model / Join: multi fields joining in query
Multi fields joining in a query
-
STEP
$snapImages=SnapImages::leftjoin("snap_face_compares",function($join) use ($snap_face_id){ $join->on("snap_images.snap_id","=","snap_face_compares.snap_id") ->on("snap_images.id","=","snap_face_compares.snap_image_id") ->on("snap_face_compares.face_id","=",DB::raw($snap_face_id)); })->whereNull('snap_face_compares.id')