title: lazychaser/laravel-nestedset - how to limit depth of nested items, when item created?
body: <p>I'm currently working on a project which is making use of nested categories. As is most likely obvious, there will be categories which will have parent-child relationships. To help with this, I am learning how the <a href="https://github.com/lazychaser/laravel-nestedset" rel="nofollow noreferrer">lazychaser/laravel-nestedset</a> Laravel package could work.</p>
  
  <p>What I would like to know is if I can limit the depth of parent categories (i.e. max. depth of root tree) to an arbitrary limit (e.g 5), like so:</p>
  
  <pre><code>Category 1
  |__ Category 2
      |__ Category 3
          |__ Category 4
              |__ Category 5
  </code></pre>
  
  <p>Following on from the above description... </p>
  
  <p>What would be the recommended way to make an Eloquent model rule - where I can specify an integer value for the maximum category depth (max. depth of root tree)? Then, perhaps catch an exception, or deal with an error in the controller if this maximum depth is already reached (when creating a category)?</p>