title: Laravel hasManyThrough a polymorphic relation
body: <p>I have a table with transactions where every <code>Transaction</code> belongs to either a <code>Driver</code>, or a <code>Customer</code> - so I set a polymorphic relation between them.</p>
  
  <p>For Transaction I have set:</p>
  
  <pre><code>public function owner() {
      return $this-&gt;morphTo();
  }
  </code></pre>
  
  <p>For Driver and Customer:</p>
  
  <pre><code>public function transactions() {
      return $this-&gt;morphMany(Transaction::class, 'owner');
  }
  </code></pre>
  
  <p>But each driver also belongs to a <code>Company</code>. And I am trying to get all transactions that belong to a <code>Company</code> through <code>hasManyThrough</code> relation:</p>
  
  <pre><code>public function transactions() {
      return $this-&gt;hasManyThrough(Transaction::class, Driver::class);
  }
  </code></pre>
  
  <p>But it seems to not work on a polymorphic relations, as it throws an error because it tries to look for a <code>driver_id</code> field at <code>transactions</code> table.</p>
  
  <p>What is the way to get all the transactions that belong to a Company through its drivers?</p>