feat(helper): menambahkan StringHelper untuk manipulasi string

This commit is contained in:
Yoga Pangestu 2025-09-23 22:12:28 +07:00
parent dff76ff4b1
commit 5cba7e529a
2 changed files with 13 additions and 2 deletions

View File

@ -0,0 +1,10 @@
<?php
use Illuminate\Support\Number;
if (! function_exists('formatCurrency')) {
function formatCurrency(string $value, ?string $format = 'IDR', ?string $locale = 'id_ID', int $precision = 0): string
{
return Number::currency($value, $format, $locale, $precision);
}
}

View File

@ -43,7 +43,8 @@
"Database\\Seeders\\": "database/seeders/"
},
"files": [
"app/Helpers/DateTimeHelpers.php"
"app/Helpers/DateTimeHelpers.php",
"app/Helpers/StringHelpers.php"
]
},
"autoload-dev": {
@ -92,4 +93,4 @@
},
"minimum-stability": "stable",
"prefer-stable": true
}
}