Add price directive

This commit is contained in:
Philipp Lang 2022-11-08 11:56:59 +01:00
parent 5d6339c1ad
commit 92f3e62abb
1 changed files with 2 additions and 0 deletions

View File

@ -29,5 +29,7 @@ class BladeCompiler extends BaseBladeCompiler
'->replace("'.$this->slashReplace.'", "$\\\textbackslash$")',
'; ?>',
]));
$this->directive('price', fn ($expression) => '<?php echo number_format('.$expression.', 2, ",", "."); ?>');
}
}