title: Laravel belongs to throwing undefined error
body: <p>I have 2 models.</p>
  
  <p>User:</p>
  
  <pre><code>class User extends Eloquent implements UserInterface, RemindableInterface {
  
      protected $table = 'users';
  
      public function group () 
      {
          return $this-&gt;belongsTo('Group');
      }
  }
  </code></pre>
  
  <p>And Group:</p>
  
  <pre><code>class Group extends Eloquent {
      protected $table = 'groups';
  }
  </code></pre>
  
  <p>The user table has a foreign key on the <code>group</code> column which references the <code>id</code> on the group table.</p>
  
  <p>Schema may help</p>
  
  <pre><code>Schema::table('users', function ($table) {
  
      $table-&gt;foreign('group')
          -&gt;references('id')
          -&gt;on('groups')
          -&gt;onDelete('cascade');
  
  });
  </code></pre>
  
  <p>When I try to get the group of a user using:</p>
  
  <p><code>User::find(1)-&gt;group()-&gt;name</code></p>
  
  <p>I get the error</p>
  
  <p><code>Undefined property: Illuminate\Database\Eloquent\Relations\BelongsTo::$name</code></p>
  
  <p>Group Schema as requested:</p>
  
  <pre><code>Schema::create('groups', function ($table) {
  
      $table-&gt;increments('id');
      $table-&gt;string('name');
      $table-&gt;integer('permission');
  
  });
  </code></pre>
  
  <p>Here are some screens:</p>
  
  <p><strong>users</strong> table</p>
  
  <p><img src="https://i.stack.imgur.com/s0T9U.png" alt="enter image description here"></p>
  
  <p><strong>groups</strong> table:</p>
  
  <p><img src="https://i.stack.imgur.com/KeR0O.png" alt="enter image description here"></p>
  
  <p>And the <strong>users</strong> table FK</p>
  
  <p><img src="https://i.stack.imgur.com/MejSH.png" alt="enter image description here"></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>@Cryode solved it for me in a chat session. The problem was that I had conflicting names. The model method used the same name as the column name (<code>group</code>). Simply changing the column name in the database solved the issue.</p>