title: How do I get all children that fall under a parent in eloquent?
body: <p>In my database, I have a Categories table. Categories can have parent categories, making it a recursive relationship</p>
  
  <p>I also have a products table. Each product falls under a category.</p>
  
  <p>Say, for example, I have a tree that looks like this:</p>
  
  <pre><code>Category
      Sub-Category 1
          Sub-Sub-Category 1
              Product 1
              Product 2
              Product 3
              Product 4
          Sub-Sub-Category 2
              Product 5
              Product 6
              Product 7
              Product 8
      Sub-Category 2
          Sub-Sub-Category 3
              Product 9
              Product 10
              Product 11
              Product 12
  </code></pre>
  
  <p>If I do <code>$SubCategory1-&gt;products</code>, I want it to give me Products 1-8</p>
  
  <p>If I do <code>$SubSubCategory3-&gt;products</code>, I want it to give me products 9-12</p>
  
  <p>If I do <code>$Category-&gt;products</code>, I want it to give me all products</p>
  
  <p>Basically, I want the category to give all products that fall under it</p>