title: php codeigniter: Call to undefined method CI_Loader::model()
body: <p>I wanted to make a webapplication using codeigniter but it is a while since I've used it and I'm getting an error whenever I try to load a model in my controller. I'm probably doing something stupid wrong but I can't figure out what it is. So please help me out if u can. </p>
  
  <p>This is the error I get: </p>
  
  <p><img src="https://i.stack.imgur.com/eNvVu.png" alt="error"></p>
  
  <p>Here is the code of my model: </p>
  
  <pre><code>&lt;?php 
  
  class post_model extends CI_Model {
  
      function __construct() {
          parent::__construct();
      }
  
      function getAllPosts() {
          $this-&gt;db-&gt;order_by('date', 'desc');
          $query = $this-&gt;db-&gt;get('post');
          return $query-&gt;result();
      }
  }
  ?&gt;
  </code></pre>
  
  <p>Here is the code of my controller where I load the model: </p>
  
  <pre><code>&lt;?php 
  
  if (!defined('BASEPATH'))
      exit('No direct script access allowed');
  
  class Post extends CI_Controller {
  
      public function __construct() {
          parent::__construct();
  
          $this-&gt;load-&gt;model('post_model');
      }
  
      public function index() {
          $data['title'] = 'Berichten';
          $data['posts'] = $this-&gt;post_model-&gt;getAllPosts();
  
          $this-&gt;template-&gt;load('posts', $data);
      }
  }
  </code></pre>
  
  <p>Autoload: </p>
  
  <pre><code>$autoload['helper'] = array('url', 'form', 'date');
  $autoload['model'] = array();
  </code></pre>
  
  <p><strong>Solved:</strong> I couldn't solve it but I made a new project and copy-pasted my code and now it works just fine, so no idea what was wrong. </p>