Placeholder sumarize

Hi, I would like to ask how to calculate the total price of a product if it has 2 pieces?? I tried this but it didn't work

Placeholder::make('total')
->content(function (Get $get): string {
return '' . number_format($get('cost') * $get('quantity'), 2);
}) Thank you for your advice
Was this page helpful?