@foreach($survey_data as $item) @php $beneficairy_details=json_decode($item->beneficiary_details); $form_status=\DB::table('form_status')->where('form_id',$item->survey_form_id)->where('update_by','IP')->first(); $seniorpost=\DB::table('form_status')->where('form_id',$item->survey_form_id)->where('update_by','HRU')->first(); @endphp {{-- here three condition must be filfil 1- form uc must be include in user account 2-junior user role verify according to the form step 3 form must be in pending condition --}} @if(($item->user_status=='30' || $item->user_status=='51' || $item->team_member_status=='field_supervisor') && ($form_status==null || $form_status->form_status=='P'))