dev-master
9999999-devCommon php utilities
MIT
The Requires
The Development Requires
by Sendy Halim
Wallogit.com
2017 © Pedro Peláez
Common php utilities
PHP common utilities with laravel support., (*1)
Add the following to composer.json. Then run composer update, (*2)
"bronanza/brutils": "dev-master"
For laravel support, open config/app.php and register service provider to the providers array, (*3)
Bronanza\Brutils\ServiceProvider::class
In the same config file config/app.php add the following to the aliases array, (*4)
NumberFormatter => Bronanza\Brutils\Number\FormatterFacade::class, CurrencyFormatter => Bronanza\Brutils\Currency\FormatterFacade::class,
Run the command below to publish the package config file config/brutils.php, (*5)
php artisan vendor:publish
$formatter = new \Bronanza\Brutils\Number\Formatter(0, ',', '.'); $formatter->format(10000) === '10.000'; $currencyFormatter = new \Bronanza\Brutils\Currency\Formatter($formatter, '$'); $formatter->format(10000) === '$10.000'; // Or if you've registered the facades (config based on config/brutils.php) NumberFormatter::format(10000) === '10.000'; CurrencyFormatter::format(10000) === '$10.000';
MIT, (*6)
, (*7)
Common php utilities
MIT