F
Filament2mo ago
Jakub

how to access current state of repeater item?

https://filamentphp.com/docs/3.x/infolists/entries/repeatable On the docs it has example of
RepeatableEntry::make('comments')
->schema([
TextEntry::make('author.name'),
TextEntry::make('title'),
TextEntry::make('content')
->columnSpan(2),
])
RepeatableEntry::make('comments')
->schema([
TextEntry::make('author.name'),
TextEntry::make('title'),
TextEntry::make('content')
->columnSpan(2),
])
If I wanted to mutate the title for example, how would I do that? When i do ->state and than dd record, it gives me the parent information So in this case if a post has comments, it shows me post. I want to access the specific comment?
3 Replies
Jakub
Jakub2mo ago
No description
Jakub
Jakub2mo ago
Just looking for a way to access title in the loop
toeknee
toeknee2mo ago
What about ->formatState() ? else if it gives you the entire entry array use data_get($state, 'title')
Want results from more Discord servers?
Add your server