The Vue filter for showing currency is not working. I want to show currencies with Vue.js in my HTML code.
And I got an error:
Use of undefined constant currency - assumed 'currency' (this will throw an Error in a future version of PHP) (0)
My code in transaksi.js
:
Vue.filter('currency', function (money) {
return accounting.formatMoney(money, "Rp ", 2, ".", ",")
})
And in HTML tag:
<td>Rp. {{ $product->price | curency }}</td>