MEDICATION : @php $w = array('procedure_code' =>$casedata->procedure_code); $mediwhere[] = array('caseuniq',$casedata->caseuniq); $mediwhere[] = array('comcreate',$casedata->comcreate); $tb_casemedication = DB::table('tb_casemedication')->where($mediwhere)->first(); $anesthesis = DB::table('dd_anesthesis')->where($w)->get(); $unit = DB::table('dd_unitdose')->get(); $c_medi = 0; @endphp @foreach($anesthesis as $medi) @if(mediVALUE($medi->anesthesis_id,$tb_casemedication->medi_casejson) != '') {{$medi->anesthesis_name}}   {{mediVALUE($medi->anesthesis_id,$tb_casemedication->medi_casejson)}}   {{$medi->anesthesis_unit}}
@php $c_medi++; @endphp @endif @endforeach {{@$tb_casemedication->medi_other}}   {{@$tb_casemedication->medi_otherdose}}   @foreach ($unit as $un) @if($un->id==$tb_casemedication->medi_otherunit) {{$un->name}} @endif @endforeach @if(($c_medi==0) ) None @endif