title: laravel can not access to relation attributes
body: <p>I have model product as follow:</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Product extends Model
  {
      //
  
      public function Category(){
          return $this-&gt;belongsTo('App\Category');
      }
      public function size_unit(){
          return $this-&gt;belongsTo('App\size_unit', 'size_unit');
      }
  }
  </code></pre>
  
  <p>the size_units table have two columns: id, unit
  the product table have size_unit column which is foreign key that reference the id on size_units table</p>
  
  <p>when I try to access unit column for product using:</p>
  
  <pre><code>{{ $product-&gt;size_unit-&gt;unit }}
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>"Trying to get property 'unit' of non-object"</p>
  </blockquote>
  
  <p>but when I use:</p>
  
  <pre><code>{{ dd($product-&gt;size_unit() }}
  </code></pre>
  
  <p>I can see the unit under relation -> attributes, so I tried to use:</p>
  
  <pre><code>$product-&gt;size_unit()-&gt;unit
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>"Undefined property: Illuminate\Database\Eloquent\Relations\BelongsTo::$unit"</p>
  </blockquote>
  
  <p>i am fetching the product using with('size_unit)</p>
  
  <p>please tell me what is wrong and how to fix it?</p>