title: Laravel Trying to get property of non-object One to One relation
body: <p>Users Schema</p>
  
  <pre><code>public function up()
  {
      Schema::table('users', function($table) 
      {
          $table-&gt;create();
  
          $table-&gt;increments('id');
          $table-&gt;string('email');
          $table-&gt;string('real_name');
          $table-&gt;string('password');
  
          $table-&gt;timestamps();
  
      });
  }
  </code></pre>
  
  <p>Dni Schema  </p>
  
  <pre><code>public function up()
      {
          Schema::table('dnis', function($table){
              $table-&gt;create();
  
              $table-&gt;increments('id');
              $table-&gt;integer('user_id');
              $table-&gt;string('numero',15);
  
              $table-&gt;timestamps();
          });
      }
  </code></pre>
  
  <p>I have These models</p>
  
  <pre><code>User:
  
      &lt;?php
      class User extends Eloquent
      {
        public function setPassword($string) 
        {
          $this-&gt;setAttribute('password', Hash::make($string));
        }
        public function dni()
        {
          return $this-&gt;hasOne('Dni', 'user_id');
        }
      }
  </code></pre>
  
  <p>Dni</p>
  
  <pre><code>&lt;?php
  class Dni extends Eloquent
  {
      public function user()
      {
          return $this-&gt;belongsTo('User');
      }
  }
  </code></pre>
  
  <p>And when i try to</p>
  
  <pre><code>public function getIndex()
      {
          $users = User::all();
          return View::make('users.index') -&gt; with('users', $users);
      }
  </code></pre>
  
  <p>I use a foreach in my view and cant get <code>{{ $user-&gt;dni-&gt;numero }}</code> to work
  I guess i'm missing something in <code>getIndex()</code> but can't figure out what.</p>
  
  <p>I used <code>var_dump($users)</code> and <code>var_dump($user)</code> in the foreach and i seems that no dni date is being sent on $users</p>