title: Laravel unify multiple relations into one
body: <p>In my application there are three models: <code>User</code>, <code>Product</code> and <code>Retailer</code>. A user can optionally be associated with one <code>Retailer</code>.</p>
  
  <p>Each <code>Product</code> belongs to one <code>User</code> and optionally one Retailer.</p>
  
  <p>Users should then be able to access all <code>Product</code>s that belong to them, as well as all products that belong to the retailer they are associated with (if any).</p>
  
  <p>Basically what this means is that I need to create two relations and somehow unify them.</p>
  
  <pre><code>public function products()
  {
      // Via column `user_id` in products table
      return $this-&gt;hasMany('App\Product');
  }
  
  // And:
  public function products()
  {
      // Via column `user_id` in products table
      return $this-&gt;hasManyThrough('App\Product', 'App\Retailer');
  }
  </code></pre>
  
  <p>How am I able to unify these two relations into one?</p>