© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Gustave

Issue with nested TextColumn on Polymorphic relation

Hi folks, I try to display a TextColumn with a nested relation inside. With a simple relation like :
public function assignee() {
        return $this->belongsTo(User::class);
    }
public function assignee() {
        return $this->belongsTo(User::class);
    }

...
Tables\Columns\TextColumn::make('assignee.initials')
Tables\Columns\TextColumn::make('assignee.initials')


It works ! but when the relation is polymorphic :

public function owner() {
        return $this->morphTo('ownerable');
    }
public function owner() {
        return $this->morphTo('ownerable');
    }


Tables\Columns\TextColumn::make('owner')
Tables\Columns\TextColumn::make('owner')
will display the owner object and it's ok but
Tables\Columns\TextColumn::make('owner.initials')
Tables\Columns\TextColumn::make('owner.initials')
will result in empty cells. Someone can give me some help ?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Summing TextColumn on nested relationship
FilamentFFilament / ❓┊help
2y ago
polymorphic relation manager
FilamentFFilament / ❓┊help
3y ago
Issue with relationmanager on complicated relation (bug?)
FilamentFFilament / ❓┊help
16mo ago
TextColumn with nested relationships - How to display unique values?
FilamentFFilament / ❓┊help
5mo ago