public function scopeLimitDepth($query, $limit)
{
$depth = $this->exists ? $this->getDepth() : $this->getLevel();
$max = $depth + $limit;
$scopes = [$depth, $max];
return $query->whereBetween($this->getDepthColumnName(), [min($scopes), max($scopes)]);
}