title: CodeIgniter can't call function from model in controller
body: <p>I am fairly new to Codeigniter and am trying to call in a function from my model but I cannot get it to work. Can anyone see what I am doing wrong here?</p>
  
  <p>Controller (farm.php):</p>
  
  <pre><code>&lt;?php defined('BASEPATH') OR exit('No direct script access allowed');
  
      class Farm extends CI_Controller {
  
          function __construct()
          {
              parent::__construct();
              $this-&gt;load-&gt;model('harvest_first');
          }
  
          function harvest()
          {
  
              echo $this-&gt;harvest_first-&gt;harvest();
          }   
      }
  </code></pre>
  
  <p>Model (harvest_first.php):</p>
  
  <pre><code>&lt;?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
      class Harvest_first extends CI_Model
      {
  
          public function __construct()
          {
              parent::__construct();
          }
  
          public function harvest(){
              return "THE FUNCTION";
          }
      }
  ?&gt;
  </code></pre>
  
  <p>I am trying to echo "THE FUNCTION", but no matter what I do I cannot get it to work as expected.</p>
  
  <p>Thanks,
  Simon</p>