add formatMoney helper
This commit is contained in:
parent
17de29ec91
commit
26d2d87104
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
if (! function_exists('formatMoney')) {
|
||||
function formatMoney(int|float $dollars): string
|
||||
{
|
||||
return '$'.number_format($dollars, 2);
|
||||
}
|
||||
}
|
||||
|
|
@ -28,6 +28,9 @@
|
|||
"pestphp/pest-plugin-laravel": "^4.0"
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"app/helpers.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"Database\\Factories\\": "database/factories/",
|
||||
|
|
|
|||
Loading…
Reference in New Issue