© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
15 replies
Pritbor

how to show a MorphOne table in filament Table?

I am struggling to access MorphOne relationship data in my table. I have Member model with MorphOne relationship with User and Company model. And I am trying display logo. But I am failing everytime. I use below code.
                ImageColumn::make(function (Member $record) {
                    return $record->member_type === 'company' ? $record->memberable->profile->logo : $record->memberable->profile_photo_path;
                })->size(200),
                ImageColumn::make(function (Member $record) {
                    return $record->member_type === 'company' ? $record->memberable->profile->logo : $record->memberable->profile_photo_path;
                })->size(200),
I get repeat error saying
Filament\Tables\Columns\Column::make(): Argument #1 ($name) must be of type string, Closure given, called in /var/www/html/app/Filament/Admin/Resources/MemberResource.php on line 103
Filament\Tables\Columns\Column::make(): Argument #1 ($name) must be of type string, Closure given, called in /var/www/html/app/Filament/Admin/Resources/MemberResource.php on line 103
.
Solution
you can use ->state()
Jump to solution
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

How to filament table in filament form in v3?
FilamentFFilament / ❓┊help
3y ago
How to show Count relationship in table?
FilamentFFilament / ❓┊help
3y ago
how to show roles in user table
FilamentFFilament / ❓┊help
3y ago
how to create nested table in filament?
FilamentFFilament / ❓┊help
3y ago