title: Using Eloquent in Codeigniter, I'm having trouble setting up relationships
body: <p>I followed <a href="http://jamieonsoftware.com/post/90299647695/using-eloquent-orm-inside-codeigniter-with-added" rel="nofollow">this tutorial</a> to get Laravel's Eloquent running inside an existing Codeigniter project and everything worked fine until I attemped to use Eloquent's relationships. Here's my offending code:</p>
  
  <pre><code>class Announcement_model extends Eloquent {
      protected $table = 'announcements';
      public function game() {
          $this-&gt;load-&gt;model('game_model');
          return $this-&gt;belongsTo('Game_model', 'game_id');
      }
  }
  
  class Game_model extends Eloquent {
      protected $table = 'games';    
  }
  </code></pre>
  
  <p>And the controller:</p>
  
  <pre><code>class Api_announcement extends REST_Controller {
      ...
      public function index_get() {
          $response = Announcement_model::with('game')-&gt;get();
          $this-&gt;response(array('error'=&gt; false, 'response' =&gt; $response), 200);
      }
  }
  </code></pre>
  
  <p>I'm running into this error:</p>
  
  <pre><code>&lt;b&gt;Fatal error&lt;/b&gt;:  Uncaught exception 'LogicException' with message 'Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation' in myproject\vendor\illuminate\database\Eloquent\Model.php:2695
  Stack trace:
  #0 myproject\vendor\illuminate\database\Eloquent\Model.php(2665): Illuminate\Database\Eloquent\Model-&amp;gt;getRelationshipFromMethod('load')
  #1 myproject\vendor\illuminate\database\Eloquent\Model.php(2607): Illuminate\Database\Eloquent\Model-&amp;gt;getRelationValue('load')
  #2 myproject\vendor\illuminate\database\Eloquent\Model.php(3325): Illuminate\Database\Eloquent\Model-&amp;gt;getAttribute('load')
  #3 myproject\application\models\announcement_model.php(11): Illuminate\Database\Eloquent\Model-&amp;gt;__get('load')
  #4 myproject\vendor\illuminate\database\Eloquent\Builder.php(477): Announcement_model-&amp;gt;game()
  #5 [internal function]: Illuminate\Database\Eloquent\Builder-&amp;gt;Illuminate\Database\Eloquent\{closure}()
  #6  in 
  &lt;b&gt;myproject\vendor\illuminate\database\Eloquent\Model.php&lt;/b&gt; on line 
  &lt;b&gt;2695&lt;/b&gt;
  </code></pre>
  
  <p>What am I doing wrong? I've looked up and down for a solution but nothing works. </p>