Add integer when rendering price
This commit is contained in:
parent
b4dbd7d312
commit
74800de149
|
@ -15,8 +15,8 @@ class BladeCompiler extends BaseBladeCompiler
|
||||||
public function registerEscapeDirective(): void
|
public function registerEscapeDirective(): void
|
||||||
{
|
{
|
||||||
$this->directive('escape', fn ($expression) => implode('', [
|
$this->directive('escape', fn ($expression) => implode('', [
|
||||||
'<?php echo str('.$expression.')',
|
'<?php echo str(' . $expression . ')',
|
||||||
'->replace("\\\", "'.$this->slashReplace.'")',
|
'->replace("\\\", "' . $this->slashReplace . '")',
|
||||||
'->replace("$", "\\\\$")',
|
'->replace("$", "\\\\$")',
|
||||||
'->replace("#", "\\\\#")',
|
'->replace("#", "\\\\#")',
|
||||||
'->replace("%", "\\\\%")',
|
'->replace("%", "\\\\%")',
|
||||||
|
@ -26,10 +26,10 @@ class BladeCompiler extends BaseBladeCompiler
|
||||||
'->replace("}", "\\\\}")',
|
'->replace("}", "\\\\}")',
|
||||||
'->replace("~", "$\\\textasciitilde$")',
|
'->replace("~", "$\\\textasciitilde$")',
|
||||||
'->replace("^", "$\\\textasciicircum$")',
|
'->replace("^", "$\\\textasciicircum$")',
|
||||||
'->replace("'.$this->slashReplace.'", "$\\\textbackslash$")',
|
'->replace("' . $this->slashReplace . '", "$\\\textbackslash$")',
|
||||||
'; ?>',
|
'; ?>',
|
||||||
]));
|
]));
|
||||||
|
|
||||||
$this->directive('price', fn ($expression) => '<?php echo number_format('.$expression.', 2, ",", "."); ?>');
|
$this->directive('price', fn ($expression) => '<?php echo number_format(' . $expression . ' / 100, 2, ",", "."); ?>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue