Hello! How in the Volt output format a number with a partition of the groups (1000 -> 1 000)?
Hello!
First, you need to register a filter (see https://docs.phalcon.io/en/latest/reference/volt.html#id2)
$compiler->addFilter('number_format', 'number_format');
Then you need to call this filter like this:
{{ 1000|number_format(0, '.', ' ') }}
NOTE: Use those arguments for number_format that are necessary for your task (see https://php.net/number_format)
Thank you. Where should I register the filter? In service.php or in the controller? While I receive an error Unknown filter "number_format"
Where you define view service.
see in documentation "extending volt" https://docs.phalcon.io/en/latest/reference/volt.html#extending-volt
Registered in service.php in protected function initSharedVolt