ENDOSCOPE USED : @foreach($scopeall as $scope) @php $sc = ""; $sc_u = DB::table('tb_scope')->where('scope_name',$scope)->first(); if(isset($sc_u)){ $sc = @$sc_u->scope_name.' SN '.@$sc_u->scope_serial." [".@$sc_u->scope_model."]"; }else{ $sc = $scope; } @endphp {{$sc}} @endforeach