title: Laravel/Ardent - on save(), error: Relationship method must return an object of type Illuminate
body: <p>I'm having some trouble getting my Laravel relationships to work out.  In my application, there is a one-to-many relationship between users and ideas.  (A user may have multiple ideas.)  I'm using Ardent.  </p>
  
  <p>Here's my User model:</p>
  
  <pre>
  
  use Illuminate\Auth\UserTrait;
  use Illuminate\Auth\UserInterface;
  use Illuminate\Auth\Reminders\RemindableTrait;
  use Illuminate\Auth\Reminders\RemindableInterface;
  
  use LaravelBook\Ardent\Ardent;
  
  class User extends Ardent implements UserInterface, RemindableInterface {
  
      use UserTrait, RemindableTrait;
  
      /**
       * The database table used by the model.
       *
       * @var string
       */
      protected $table = 'users';
  
      /**
       * The attributes excluded from the model's JSON form.
       *
       * @var array
       */
      protected $hidden = array('password', 'remember_token');
      protected $fillable = array('first_name', 'last_name', 'email', 'password');
  
      public $validation_errors;
      public $autoPurgeRedundantAttributes = true;
      public $autoHashPasswordAttributes = true;
      public $autoHydrateEntityFromInput = true;
  
      public static $passwordAttributes  = array('password');
  
      public static $rules = array(
          'first_name'            => 'required|between:1,16',
          'last_name'             => 'required|between:1,16',
          'email'                 => 'required|email|unique:users',
          'password'              => 'required|between:6,100'
      );
  
      public function ideas()
      {
          return $this->hasMany('Idea');
      }   
  }
  
  </pre>
  
  <p>And here's my Idea model:</p>
  
  <pre>
  
  use LaravelBook\Ardent\Ardent;
  
  class Idea extends Ardent {
  
      /**
       * The database table used by the model.
       *
       * @var string
       */
      protected $table = 'ideas';
  
      protected $fillable = array('title');
  
      public $validation_errors;
      public $autoPurgeRedundantAttributes = true;
      public $autoHydrateEntityFromInput = true;
  
      public static $rules = array(
          'title'            => 'required'
      );
  
      public function user()
      {
          return $this->belongsTo('User');
      }
  }
  </pre>
  
  <p>Finally, here's my controller code:</p>
  
  <pre>
  class IdeasController extends BaseController {
  
      public function postInsert()
      {
          $idea = new Idea;
  
          $idea->user()->associate(Auth::user());
  
          if($idea->save())
          {
              return Response::json(array(
                  'success' => true,
                  'idea_id' => $idea->id,
                  'title' => $idea->title),
                  200
              );
          }
          else
          {
              return Response::json(array(
                  'success' => false,
                  'errors' => json_encode($idea->errors)),
                  400
              );
          }
      }
  
  }
  </pre>
  
  <p>$idea->save() throws the error:  </p>
  
  <pre><code>{
    "error": {
      "type": "LogicException",
      "message": "Relationship method must return an object of type Illuminate\\Database\\Eloquent\\Relations\\Relation",
      "file": "\/var\/www\/3os\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Eloquent\/Model.php",
      "line": 2498
    }
  }
  </code></pre>
  
  <p>At first, I was trying to set the user_id in the Idea like so:</p>
  
  <pre><code>$idea-&gt;user_id = Auth::id();
  </code></pre>
  
  <p>I then changed it to:</p>
  
  <pre><code>$idea-&gt;user()-&gt;associate(Auth::user());
  </code></pre>
  
  <p>But the results were the same.  </p>
  
  <p>Any suggestions would be much appreciated.</p>