//Same issue with l 5.3 but added the where clause before merge binding
$memo = DB::table('communications')->select('subject,sender,recipients,cc,bcc,approval_list,communications.created_at,communications.type as message_type,communications.reftag,users.name as sender_name,users.photo,users.core_role as sender_role,users.reftag as sender_tag')->join('users','users.id','=','communications.sender')
->where('communications.type',1)->orderBy('created_at','desc')->limit(1);
$queries = DB::table('communications')->select('subject,sender,recipients,cc,bcc,approval_list,communications.created_at,communications.type as message_type,communications.reftag,users.name as sender_name,users.photo,users.core_role as sender_role,users.reftag as sender_tag')->join('users','users.id','=','communications.sender')
->where('communications.type',2)->orderBy('created_at','desc')->limit(1);
$circular = DB::table('communications')->select('subject,sender,recipients,cc,bcc,approval_list,communications.created_at,communications.type as message_type,communications.reftag,users.name as sender_name,users.photo,users.core_role as sender_role,users.reftag as sender_tag')->join('users','users.id','=','communications.sender')
->where('communications.type',3)->orderBy('created_at','desc')->limit(1);
$sql = $memo->union($queries)->union($circular);
//since you are using db raw before merge bindings, write your where conditions there before the merge binding method. worked for me
$messages = DB::table('communications')->select('*')->from(DB::raw("(".$sql->toSql().") as messages where (sender = ".$currentUser." or find_in_set(".$currentUser.", recipients) or find_in_set(".$currentUser.", cc) or find_in_set(".$currentUser.", bcc) or find_in_set(".$currentUser.", approval_list)) "))->mergeBindings($sql->getQuery())->orderBy('created_at','desc')->get();