如何从收件箱菜单中消失符号?

In this project doctors will be informed through message if any appointments are taken by patient.

Controller

function message_view()
  {
    if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] === true && $_SESSION['role'] === '2' && $_SESSION['role_des'] === 'doctor') 
        {
          $this->session->all_userdata();
          $id = $this->session->userdata('user_id');
          $data['count']=$this->appoint_model->get_msg_count($id);
          $data['msg']=$this->appoint_model->get_doctor_appoin($id);
          //var_dump($data['msg']);die();
          $this->load->view('doctor/header', $data);
          $this->load->view('doctor/modal_message',$data);
        }    
  }

Model

public function get_msg_count($id)
    {
      $this->db->select('*');
      $this->db->from('tbl_appointment');
      $this->db->where('status','1');
      $this->db->where('dr_id',$id);
      $q = $this->db->get();
      return $q->num_rows();
    }
    <div class="modal fade" id="myModal" style="z-index:10000;" role="dialog">
    <div class="modal-dialog modal-xs">
        <div class="modal-content">
          <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal">&times;</button>
              <h4 class="modal-title">Message</h4>
            </div>

            <div class="modal-body" >
              <div class="row">
                <div class="col-md-8 col-md-offset-2"> 
    <?php 
    foreach ($msg->result() as $row) {?>
    <center><h4>You have an appointment on <?php echo $row->appoint_date;?> at <?php echo $row->time;?>. Patient Name: <?php echo $row->ap_name;?></h4>
    </center>
    <?php }
    ?>       
    </div>

                </div>
            </div>


          <div class="modal-footer">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
    </div>
       </div>
       </div>

In this screenshot a red color round in the menu Message, this red round must be disappear after the doctor reading the message.

enter image description here

As I cannot comment because of 50 rep limit I'm posting an answer.

You can add a Boolean field(tinyint) like 'is_read' to your table and you can update its status to 1 on view of the message by the doctor through ajax or simple post method.

You can simply show the counts when the doctor has some unread messages (ie) No is_read field have value 1