I have some textbox like this
{{{ Form::number('amount', $cash->amount , array('class'=>'form-control')) }}}
but I want to display the textbox in currency formatting
I have try to make Laravel directive like this
Blade::directive('convert', function ($money) { return "<?php echo 'Rp.' . number_format($money, 2); ?>"; });
and when I try in textbox {{{ Form::number('amount', @convert($cash->amount) , array('class'=>'form-control')) }}}
that return parse error unexpected '<'
and the I'm trying to call the convert in label but that's error too.
and when I'm not using variabel, just doing like this
<label>@convert(11223344)</label>
that's work.
Thankyou