Computation from separate repeater

How to get the total of the inputtext value from separate repeater?
image.png
Solution
Repeater::make('repeater')
    ->schema([...]),

Placeholder::make('total')
    ->content(function ($get) {
        $total = Arr::map($get('repeater'), function ($item) {
            return $item['qtd'] * $item['price'];
        });

        return array_sum(array_values($total));
    })

Could be better I think
Was this page helpful?