3 Similar Columns (Slug or ID)

I need 3 similar columns on one table. I'm using nested set, but it really just two relationships on the same model.

    public function parent(): BelongsTo
    {
        return $this->belongsTo(self::class, 'parent_id');
    }

    public function root(): HasOne
    {
        return $this->hasOne(self::class, 'root_parent_id');
    }


                Tables\Columns\TextColumn::make('slug')
                    ->label('Series')
                    ->sortable()
                    ->toggleable()
                    ->wrap()
                    ->searchable(isIndividual: true),
                Tables\Columns\TextColumn::make('parent.slug')
                    ->label('Parent')
                    ->sortable()
                    ->toggleable()
                    ->searchable(isIndividual: true),
                Tables\Columns\TextColumn::make('root.slug')
                    ->label('Root Parent')
                    ->sortable()
                    ->toggleable()
                    ->searchable(isIndividual: true),


In the above example the first two instances of slug work, but the 3rd doesn't. If I change those to pull the id via relationship it doesn't work either. How can I overcome this? What's going on here in the background?
Screenshot_2023-04-07_at_10.02.33_AM.png
Was this page helpful?