manual url : https://laravel.kr/docs/7.x/queries
$machines = Machine::join('M_CODE_LIST', 'M_LAB_MACHINE.code_lab', '=', 'M_CODE_LIST.code')
->where('M_CODE_LIST.code_name', 'CODE_LAB')
->where('M_CODE_LIST.is_valid', 'Y')
->get();
$machines = Machine::join('테이블', '테이블1.필드', '=', '테이블2.필드')
->where('M_CODE_LIST.code_name', 'CODE_LAB')
->where('M_CODE_LIST.is_valid', 'Y')
->get();