TextColumn with relationship first_name, last_name

Hi all, in the table i have the following code:

        return $table
            ->columns([
                Tables\Columns\TextColumn::make('absentTeacher.first_name')
                    ->label('Teacher Absent')
                    ->sortable(),

...

In the text of the colum i would to take the absentTeacher.first_name and absentTeacher.last_name, how can i do that?

thanks
Was this page helpful?