diff --git a/docs/src/reference/types/column/options/column.md b/docs/src/reference/types/column/options/column.md index 8e0f56c5..39a26b7b 100644 --- a/docs/src/reference/types/column/options/column.md +++ b/docs/src/reference/types/column/options/column.md @@ -116,7 +116,9 @@ Formats the value to the desired string. ```php $builder ->addColumn('quantity', NumberColumnType::class, [ - 'formatter' => fn (float $value) => number_format($value, 2) . 'kg', + 'formatter' => function (float $value, Product $product, ColumnInterface $column, array $options) { + return number_format($value, 2) . $product->getUnit(); + }, ]) ; ```