collect repeatable entry in a table

The problem : I want to collect the options in one table , in the view page of the product . What I did : I searched how but I found nothing How can I do it please ? thank you !
php RepeatableEntry::make('options')
->schema([
Components\TextEntry::make('option')->label('Option'),
Components\TextEntry::make('value')->label('Value'),
Components\TextEntry::make('qte')->label('Quantity'),
RepeatableEntry::make('subOption')
->schema([
Components\TextEntry::make('sub_option')->label('Option'),
Components\TextEntry::make('value')->label('Value'),
Components\TextEntry::make('qte')->label('Quantity'),
])->columns(3)->columnSpanFull()->hidden(function() use ($infolist){
//hidd if the count is 0
if(count($infolist->record->subOptions) === 0){
return true;
}
}),
])
->columns(3),
php RepeatableEntry::make('options')
->schema([
Components\TextEntry::make('option')->label('Option'),
Components\TextEntry::make('value')->label('Value'),
Components\TextEntry::make('qte')->label('Quantity'),
RepeatableEntry::make('subOption')
->schema([
Components\TextEntry::make('sub_option')->label('Option'),
Components\TextEntry::make('value')->label('Value'),
Components\TextEntry::make('qte')->label('Quantity'),
])->columns(3)->columnSpanFull()->hidden(function() use ($infolist){
//hidd if the count is 0
if(count($infolist->record->subOptions) === 0){
return true;
}
}),
])
->columns(3),
No description
1 Reply