title: Eloquent: Joining Many To Many, Get One Field
body: <p>This is how the query would look like in say a usual query</p>
  
  <pre><code>SELECT `t3`.d FROM `t1` INNER JOIN `t3` ON `t3`.`t1_id` = `t1`.`id`
  INNER JOIN `t2` ON `t2`.`id` = `t3`.`t2_id`
  WHERE `td2`.a = 'hi'
  </code></pre>
  
  <p>Where t1 would have many to many to t2, and t3 is the pivot table. The query above would query a "a" column and get the pivot data in column d from the pivot table.</p>
  
  <p><strong>How can I make a similar query in Eloquent?</strong></p>