title: Self Join in Eloquent - How To Call
body: <p>I recently asked a question regarding a self join</p>
  
  <p><a href="https://stackoverflow.com/questions/30592793/self-join-in-eloquent">SO</a></p>
  
  <p>I got a great answer but I'm not sure how to call it.</p>
  
  <p>I need to do this query:</p>
  
  <pre><code>SELECT t2.title FROM products t1, products t2
  WHERE t1.id = $id 
  AND t2.color_id = t1.color_id AND
  t2.id != $id
  </code></pre>
  
  <p>I now have this on my products model:</p>
  
  <pre><code>public function parent()
  {
      return $this-&gt;belongsTo(self::class, 'color_id');
  }
  
  public function children()
  {
      return $this-&gt;hasMany(self::class, 'color_id');
  }
  </code></pre>
  
  <p>But how do I call this?</p>
  
  <pre><code>Product::with('children')-&gt;find(1);
  </code></pre>
  
  <p>The above gets the product with id 1 but also gets children that have a color_id of 1, I need to get children who have a color_id the same as the id as product 1.</p>
  
  <p>eg.</p>
  
  <p>Products</p>
  
  <pre><code>id | title | color_id
   1    dvd       2
  </code></pre>
  
  <p>When I select row 1 it should select all other products with a color_id of 2.</p>