F
Filament4mo ago
morty

Infolist table repeater or key-value from a relationship?

Hi, Is there a way to display a list of key-values from a has many relationship in an infolist? If not, is there a way to display a table of this relationship? For example, If my infolist was about an Author model, is there an infolist entry I can use to display a list of all the author's books from a related Book model?
Solution:
Hmm actually, I managed to get there in the end. ```php Infolists\Components\RepeatableEntry::make('grades') ->hiddenLabel()...
No description
Jump to solution
2 Replies
morty
mortyOP4mo ago
I can get close with a repeater but I want a way more condensed version without the duplicated labels.
Infolists\Components\RepeatableEntry::make('grades')
->hiddenLabel()
->schema([
Infolists\Components\TextEntry::make('name'),
Infolists\Components\TextEntry::make('value'),
])->columns(2),
Infolists\Components\RepeatableEntry::make('grades')
->hiddenLabel()
->schema([
Infolists\Components\TextEntry::make('name'),
Infolists\Components\TextEntry::make('value'),
])->columns(2),
No description
Solution
morty
morty4mo ago
Hmm actually, I managed to get there in the end.
Infolists\Components\RepeatableEntry::make('grades')
->hiddenLabel()
->contained(false)
->schema([
Infolists\Components\TextEntry::make('name')
->hiddenLabel(),
Infolists\Components\TextEntry::make('value')
->hiddenLabel(),
])->columns(2),
Infolists\Components\RepeatableEntry::make('grades')
->hiddenLabel()
->contained(false)
->schema([
Infolists\Components\TextEntry::make('name')
->hiddenLabel(),
Infolists\Components\TextEntry::make('value')
->hiddenLabel(),
])->columns(2),
No description
Want results from more Discord servers?
Add your server