title: laravel sql design
body: <p>Here is my table</p>
  
  <pre><code>Table Food
  id    sub(foreign key Food.id)   name
  1                                Apple
  2      1                         Apple juice
  3      2                         Apple juice product
  4                                Orange
  </code></pre>
  
  <p>How can i got my result like?</p>
  
  <p>if i search by id = 1, the result return id 1 ,2 ,3</p>
  
  <p>if i search by id = 2, the result return id 1 ,2 ,3</p>
  
  <p>if i search by id = 4, the result return id 4</p>
  
  <p>Using loop? or any other way</p>
  
  <p>i wanna to get all related to id = 1 using sub foreign key
  id(2).sub is 1 and result include id(2), and id(3).sub also related to id(2), so that result include id(3)</p>