Une Erreur PHP a été rencontrée Gravité: Message notice: Undefined property: Site::$site_model

Une Erreur PHP a été rencontrée

Gravité: Avis

Message: Undefined property: Site::$site_model

Nom de fichier: controllers/site.php

Numéro De Ligne: 13

Contrôleur de Site site.php
Erreur fatale: Appel d'une fonction membre delete_row() sur un non-objet dans
C:\xampp\htdocs\login\application\controllers\site.php sur la ligne 13

Mon contrôleur->Site.php

<?php 
class Site extends CI_Controller{
    function __construct(){
      parent::__construct();
      $this->is_logged_in();

    }
    function delete(){
      $this->site_model->delete_row();
      $this->index();
    }
    function members_area(){
      $this->load->model('patient_model');
      $data['records'] = $this->patient_model->getAll();
      $this->load->view('members_area', $data);
    }
    function add(){
       $data['main_content'] = 'patient_form';
       $this->load->view('includes/template',$data);
    }
    function is_logged_in(){
       $is_logged_in = $this->session->userdata('is_logged_in');
        if(!isset($is_logged_in) || $is_logged_in != true){
          echo 'Your don\'t have permission to access this page. <a href="../login">Login</a>';
          die();
        }
    }
} 

Mon modèle -> site_model.php

class Site_model extends CI_Model{
    function get_records(){
          $query = $this->db->get('patient');
           return $query->result();
    }
    function delete_row(){
          $this->db->where('id', $this->uri->segment(3));
          $this->db->delete('patient');
    }
    function create_member(){
          $new_member_insert_data = array(
          'fname' => $this->input->post('fname'),
          'lname' => $this->input->post('lname'),
          'email' => $this->input->post('email'),
          'address' => $this->input->post('address'),
          'contact' => $this->input->post('contact'),
          'remarks' => $this->input->post('remarks')
    );
    $insert = $this->db->insert('patient', $new_member_insert_data);
    return $insert;
    }
}

Mon vue-> members_area.php

<?php $this->load->view('includes/header');?>

<div id="main">
Welcome Back, <u><?php echo $this->session->userdata('username'); ?>!</u>
<h3>Vision Eye Medical Center Patient Information</h3>

<div id="overflow">
  <table class="features-table">

        <thead>
          <tr>
            <td>Patient Name</td>
            <td>Email</td>
            <td>Address</td>
            <td>Contact</td>
            <td>Remarks</td>
            <td>Action</td>
          </tr>
        </thead>

        <tfoot>
          <tr>
            <td></td>
            <td>-</td>
            <td>-</td>
            <td>-</td>
            <td>-</td>
            <td>-</td>
          </tr>
        </tfoot>          
        <tbody>
        <?php foreach($records as $row): ?>
          <tr>
            <td><?php echo $row->fname;?>
              <?php echo $row->lname;?>
            </td>

            <td><?php echo $row->email;?></td>
            <td><?php echo $row->address;?></td>
            <td><?php echo $row->contact;?></td>      
            <td><?php echo $row->remarks;?></td>      
            <td>View|<?php echo anchor("site/delete/$row->id",'delete');?></td>     
          </tr>

          <?php endforeach; ?>
        </tbody>
    </table>

 </div>   
  <?php echo form_open();?>
     <?php echo anchor('patient/add', 'Add new Data'); ?><?php echo anchor('login/logout', 'Logout'); ?><br>
    <?php echo form_close();?>

</div>
<?php $this->load->view('includes/footer');?>