feat(helper): menambahkan StringHelper untuk manipulasi string
This commit is contained in:
parent
dff76ff4b1
commit
5cba7e529a
10
app/Helpers/StringHelpers.php
Normal file
10
app/Helpers/StringHelpers.php
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -43,7 +43,8 @@
|
|||||||
"Database\\Seeders\\": "database/seeders/"
|
"Database\\Seeders\\": "database/seeders/"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"app/Helpers/DateTimeHelpers.php"
|
"app/Helpers/DateTimeHelpers.php",
|
||||||
|
"app/Helpers/StringHelpers.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
@ -92,4 +93,4 @@
|
|||||||
},
|
},
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"prefer-stable": true
|
"prefer-stable": true
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user