title: Laravel Eloquent - Get all X through it's Y column
body: <p>Let's say I have a Thread model, which <code>hasMany</code> Post.
  I want to get all Post that belongs to a certain thread.</p>
  
  <p>However the <code>query</code> params sent to the controller is not <code>id</code>, but is the <code>'thread_name'</code> of the Thread.</p>
  
  <p>What I'm doing right now is something like this:</p>
  
  <p>1) Get the thread by <code>thread_name</code> (for argument sake, it's unique), which will give me <code>$thread</code><br>
  2) Get all post where <code>thread_id = $thread-&gt;id</code></p>
  
  <p>I think this is not efficient because I'm sending doing two SQL queries.</p>
  
  <p>Is there anyway to select the post through <code>thread_name</code>?</p>
  
  <p>I'm sorry, I think this thread's title is quite confusing.</p>