Closed mblarsen closed 4 years ago
I couldn't agree more! Thanks for bringing this library to our attention; it sounds perfect.
I found it while looking at Laravel Cachier which uses it too.
Should I try to use that in the casts PR #164? If tests are written it shouldn't break anything/too much.
So the money values are cast directly to Money.
Yes, absolutely. This seems like a good opportunity to integrate it.
Is the API in USD only? Maybe we should stick it in a config?
I like the idea of making the currency unit configurable.
It is now a part of #164
Fixed in #164
https://github.com/moneyphp/money
Reimplementing code that deals with money, fractions, discounts, currencies is tiresome and error prone.
You could cast directly to a money instance using custom casts much the same way dates works with Carbon
One such place would be: