add formatMoney helper

This commit is contained in:
Matt Young 2026-01-28 05:14:04 -06:00
parent 17de29ec91
commit 26d2d87104
2 changed files with 11 additions and 0 deletions

8
app/helpers.php Normal file
View File

@ -0,0 +1,8 @@
<?php
if (! function_exists('formatMoney')) {
function formatMoney(int|float $dollars): string
{
return '$'.number_format($dollars, 2);
}
}

View File

@ -28,6 +28,9 @@
"pestphp/pest-plugin-laravel": "^4.0" "pestphp/pest-plugin-laravel": "^4.0"
}, },
"autoload": { "autoload": {
"files": [
"app/helpers.php"
],
"psr-4": { "psr-4": {
"App\\": "app/", "App\\": "app/",
"Database\\Factories\\": "database/factories/", "Database\\Factories\\": "database/factories/",