title: HMVC model cannot be loaded SAYS Message: Undefined property:
body: <p>hi i am currently working on a second module of my hmvc file and there comes an error that i think it wont load the models of this module. the previous modules models, works fine. what may be the error of this one? here is my codes.</p>
  
  <p>error</p>
  
  <pre><code>Severity: Notice
  
  Message: Undefined property: CI::$lEmploymentStatus_Model
  
  Filename: MX/Controller.php
  
  Line Number: 59
  
  Backtrace:
  
  File: C:\xampp\htdocs\TLC_HR\application\third_party\MX\Controller.php
  Line: 59
  Function: _error_handler
  
  File: C:\xampp\htdocs\TLC_HR\application\modules\EmploymentStatus\Controllers\EmploymentStatus.php
  Line: 43
  Function: __get
  
  File: C:\xampp\htdocs\TLC_HR\index.php
  Line: 292
  Function: require_once 
  </code></pre>
  
  <p>controller - EmploymentStatus.php</p>
  
  <pre><code>&lt;?php
  
  class EmploymentStatus extends MY_Controller{
  
      public function __construct(){
  
          parent::__construct();
      }
  
  // VIEW REDIRECTING /////////////////////////////////////////////////////////
  
      public function index(){
  
      $data['content_view'] = 'EmploymentStatus/empstat_read';
      $this-&gt;templates-&gt;admin_template($data);
  
      }
  
      public function add_view(){
  
      $data['content_view'] = 'EmploymentStatus/add_view';
      $this-&gt;templates-&gt;admin_template($data);
  
      }
  
  
  // CREATE /////////////////////////////////////////////////////////
  
      public function create(){
  
  
          $this-&gt;load-&gt;library('form_validation');
          $this-&gt;load-&gt;model('EmploymentStatus_Model');
  
          $this-&gt;form_validation-&gt;set_rules('ES_NAME','Name','trim|required|min_length[2]|max_length[20]');
          $this-&gt;form_validation-&gt;set_rules('ES_DESCRIPTION','Description','trim|required|max_length[50]');
  
          if($this-&gt;form_validation-&gt;run() == FALSE){
  
              $this-&gt;add_view();
          }else{
  
              if($query = $this-&gt;lEmploymentStatus_Model-&gt;insert()){
                  $this-&gt;add_view();
              }else{
                  $this-&gt;add_view();
              }
  
          }
  
      }
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>model - EmploymentStatus_Model.php</p>
  
  <pre><code>&lt;?php
  
  class EmploymentStatus_Model extends CI_Model{
  
  /////  CREATE /////////////////////////////////////////////////////////
  
      public function insert(){
  
          $input = array(
                  'ES_NAME' =&gt; $this-&gt;input-&gt;post('ES_NAME'),
                  'ES_DESCRIPTION' =&gt; $this-&gt;input-&gt;post('ES_DESCRIPTION')
                  );
          $insert = $this-&gt;db-&gt;insert('employment_status',$input);
          return $insert;
      }
  
  }
  
  ?&gt;
  </code></pre>