© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
Vp

infolist with relationship not working

I create infolist, play around with table and display in home page.. I can get actual record data and it displaying correct, but it cannot show relationship data.
My code:
public function lyricLists(Infolist $infolist): Infolist
{
    return $infolist
        ->state([
            'lyrics' => $this->getTableRecords(),
        ])
        ->schema([
            RepeatableEntry::make('lyrics')
                ->label('')
                ->schema([
                    TextEntry::make('album.name') // not working
                        ->label(''),
                    TextEntry::make('title') // working
                        ->label(''),
                    TextEntry::make('lyrics') // working
                        ->label(''),
                ]),
        ]);
}

public function table(Table $table): Table
{
    return $table
        ->query(
            Lyric::query()
                ->with('album')
                ->latest(),
        );
}
public function lyricLists(Infolist $infolist): Infolist
{
    return $infolist
        ->state([
            'lyrics' => $this->getTableRecords(),
        ])
        ->schema([
            RepeatableEntry::make('lyrics')
                ->label('')
                ->schema([
                    TextEntry::make('album.name') // not working
                        ->label(''),
                    TextEntry::make('title') // working
                        ->label(''),
                    TextEntry::make('lyrics') // working
                        ->label(''),
                ]),
        ]);
}

public function table(Table $table): Table
{
    return $table
        ->query(
            Lyric::query()
                ->with('album')
                ->latest(),
        );
}

If I
dd()
dd()
inside table() and yes I got data with relationships, what should be the problem?
Solution
This happen because I have boolean column "album" cast to boolean, and relationship name "album".. I've changed to different name and it working fine
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Open modal with relationship infolist
FilamentFFilament / ❓┊help
3mo ago
Infolist RepeatableEntry not working properly
FilamentFFilament / ❓┊help
3y ago
Relationship repeater not working
FilamentFFilament / ❓┊help
2y ago
Infolist TextEntry list (hasMany Relationship) with different colors
FilamentFFilament / ❓┊help
2y ago