Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

chriss39's avatar

Nova Currency Field Question

I store my transaction amounts as integers in my database and I am looking at how I can display this with Nova. Currently if I use the Currency field and I have a transaction of $29.00 it will display $2900.00 since 2900 is what is in my database. I tried to use resolveUsing and formatting myself but that didn't do anything.

Checking to see if others have come across this situation and what you did to resolve it.

0 likes
4 replies
chriss39's avatar
chriss39
OP
Best Answer
Level 7

You can ignore it. I got it to work with displayUsing and formatting it myself.

Currency::make('Amount')
            ->displayUsing(function($amount){
                return number_format((float) $amount/100, 2);
            }),
1 like
mjlovefl's avatar

Hi Chris,

I know this is old, but I was wondering what do you do for updates? If someone edits the amount and saves it it will try to save it as a float.

Please or to participate in this conversation.