title: has one through relationship laravel
body: <p>i was reading here:</p>
  
  <p><a href="https://stackoverflow.com/questions/27466542/has-one-through-laravel-eloquent">Has one through Laravel Eloquent</a></p>
  
  <p>but it does not solve the problem</p>
  
  <p>we have manufacturerer names, for example:</p>
  
  <pre><code>kohler company
  kohler
  Kohler US
  </code></pre>
  
  <p>and these names we bundle together in one single clean name -> <code>Kohler</code></p>
  
  <p>so we have a table</p>
  
  <p><code>manufacturer</code></p>
  
  <p>and one</p>
  
  <p><code>manufacturer_bundle</code></p>
  
  <p>there exist <code>products</code> created by those manufacturers</p>
  
  <p>so a product has a manufacturer, and a manufacturer is linked to a manufacturer bundle.</p>
  
  <p>But: not all products have a manufacturer entered. it can be empty. Or the manufacturer is not assigned to a manufacturer bundle.</p>
  
  <p>I want to  have a function</p>
  
  <p><code>$product-&gt;manufacturer_bundle</code></p>
  
  <p>currently i have to do</p>
  
  <p><code>$product-&gt;manufacturer-&gt;manufacturer_bundle</code></p>
  
  <p>I cannot write a function </p>
  
  <pre><code>public function manufacturer_bundle(){
    return $this-&gt;manufacturer-&gt;manufacturer_bundle;
  }
  </code></pre>
  
  <p>because <code>$this-&gt;manufacturer</code> might be empty and I return nothing, I get an error: "Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation" . What is the correct laravel way to do this?</p>