title: Laravel hasManyThrough relations in relations
body: <p>I have a question about hasManyThrough method of Eloquent.<br>
  <br>
  So i have pages db table and page_relations db table.<br>
  Into page_relations i have page_id and parent_id.<br>
  My first page have second page in child and second page have third page in child:</p>
  <ul><li>1<ul><li>2<ul><li>3</li></ul></li></ul></li></ul>
  <p>Almost is good, i use hasManyThrough for output child pages but i want to add level system for that.
  If i use this method:</p>
  <pre><code>    return $this-&gt;hasManyThrough(
        Pages::class,
        PageRelation::class,
        'parent_id', // Foreign key on the PageRelation table...
        'id', // Foreign key on the Pages table...
        'id', // Local key on the Pages table...
        'page_id' // Local key on the PageRelation table...
      );
  </code></pre>
  <p>.. it output pages with his relations BUT i haven't relations in relations (screen)
  <a href="https://i.stack.imgur.com/BaI36.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BaI36.png" alt="enter image description here" /></a></p>
  <p>What i have to do for made level system? I have to do something in model or i have to do something in controller for filter it? Maybe you'll have some idea to figure out it? I'll very appreciate you if you get me some help or share several minutes of your attention!</p>