Created
November 9, 2021 08:39
-
-
Save Queopius/22d8a47fe7dde9e5281b63713342b362 to your computer and use it in GitHub Desktop.
Formater Currency
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Actions\Generic; | |
trait GetNumberFormat | |
{ | |
protected function amount($number) | |
{ | |
return \NumberFormatter::create( | |
locale_get_default(), \NumberFormatter::CURRENCY | |
)->format($number) . PHP_EOL; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment