Column with relationship link to related resource

Hey there,

i want to have a TextColumn that related to a resource, for example:

TextColumn::make('user.name')

how do i relate the column to related resource using a link ? (By clicking on the name, the user can be directed to its page.)
Solution
you can do

TextColumn::make('user.name')
  ->url(fn($record): string => UserResource::getUrl('view',['record'=>$record->user->id])),
Was this page helpful?