first(); if(!empty($tahunProgramAktif)){ $user = Auth::user(); $read = \App\Model\MetadataProgramNotificationRead::where('id_user',$user->id)->pluck('id_metadata_program_notification'); $getStatus = \App\Model\Privillage\Role::where('id',Auth::user()->role_id)->value('akses'); if($getStatus == 'administrator'){ $metadataProgramNotification = \App\Model\MetadataProgramNotification::where('id_tahun_program',$tahunProgramAktif->id) ->where('readable_admin',1) ->whereNotIn('id',$read) ->get(); }else{ $metadataProgramNotification = \App\Model\MetadataProgramNotification::where('id_tahun_program',$tahunProgramAktif->id) ->where('readable',1) ->where('id_upt',$user->upt) ->whereNotIn('id',$read) ->get(); } } ?>