Laraavel hasManyThrough relations in relations

I have a question about hasManyThrough method of Eloquent.

So i have pages db table and page_relations db table.
Into page_relations i have page_id and parent_id.
My first page have second page in child and second page have third page in child:

  • 1
    • 2
      • 3

Almost is good, i use hasManyThrough for output child pages but i want to add level system for that.
If i use this method:

    return $this->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...
    );

.. it output pages with his relations BUT i haven’t relations in relations (screen)
enter image description here

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!