Does RepeatableEntry support arrays or only models?

I am currently working on a project and trying to use RepeatableEntry to manage dynamic entries for product totals. I've structured my RepeatableEntry as follows:

return RepeatableEntry::make('productTotals')
    ->label(__('Product Totals'))
    ->columns(3)
    ->state(function ($record) {
        // Demo array to test
        return [
            [
                'product' => 'Product 1',
                'quantity' => 1,
                'price' => 100,
                'total' => 100,
            ],
            [
                'product' => 'Product 2',
                'quantity' => 2,
                'price' => 200,
                'total' => 400,
            ],
        ];
    })
    ->schema([
        TextEntry::make('product')
    ]);


However, it appears that the RepeatableEntry is not displaying or functioning as expected. Does RepeatableEntry only work with Eloquent models, or can it also handle arrays like the one I am trying to use? Has anyone encountered this issue, and what solutions or workarounds might you suggest?
Was this page helpful?