Preview:
$data = DB::table('MASTER_TABLE_NAME as r')
        ->select('r.*')
        ->whereExists(function ($query) {
            $query->select(DB::raw(1))
                ->from('CHILD_TABLE_NAME')
                ->whereRaw('CHILD_TABLE_NAME.ORDER_NO = MASTER_TABLE_NAME.ORDER_NO')
                ->whereRaw('CHILD_TABLE_NAME.PRDMD_NO <> 0'); //This means not equal to 0 use = if  															  //you want equal value
        })
        ->where('r.UNIT_NO', $org_id)
        ->where('r.PM_ID', $_SESSION['section']);
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter